Lines Matching +full:reset +full:- +full:time +full:- +full:sec
1 // SPDX-License-Identifier: GPL-2.0
7 * Copied and modified from arch/i386/kernel/time.c
17 #include <linux/time.h>
29 #include <asm/time.h>
49 rtcs = of_find_compatible_node(NULL, "rtc", "ds1385-rtc"); in chrp_time_init()
84 * Set the hardware clock. -- Cort
97 save_freq_select = chrp_cmos_clock_read(RTC_FREQ_SELECT); /* stop and reset prescaler */ in chrp_set_rtc_time()
118 * battery and quartz) will not reset the oscillator and will not in chrp_set_rtc_time()
121 * sheets anyway ... -- Markus Kuhn in chrp_set_rtc_time()
132 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local
135 sec = chrp_cmos_clock_read(RTC_SECONDS); in chrp_get_rtc_time()
141 } while (sec != chrp_cmos_clock_read(RTC_SECONDS)); in chrp_get_rtc_time()
144 sec = bcd2bin(sec); in chrp_get_rtc_time()
153 tm->tm_sec = sec; in chrp_get_rtc_time()
154 tm->tm_min = min; in chrp_get_rtc_time()
155 tm->tm_hour = hour; in chrp_get_rtc_time()
156 tm->tm_mday = day; in chrp_get_rtc_time()
157 tm->tm_mon = mon; in chrp_get_rtc_time()
158 tm->tm_year = year; in chrp_get_rtc_time()