Lines Matching +full:0 +full:- +full:mon
1 // SPDX-License-Identifier: GPL-2.0
33 #define NVRAM_AS0 0x74
34 #define NVRAM_AS1 0x75
35 #define NVRAM_DATA 0x77
49 rtcs = of_find_compatible_node(NULL, "rtc", "ds1385-rtc"); in chrp_time_init()
51 return 0; in chrp_time_init()
52 if (of_address_to_resource(rtcs, 0, &r)) { in chrp_time_init()
54 return 0; in chrp_time_init()
59 nvram_as1 = 0; in chrp_time_init()
63 return 0; in chrp_time_init()
68 if (nvram_as1 != 0) in chrp_cmos_clock_read()
76 if (nvram_as1 != 0) in chrp_cmos_clock_write()
84 * Set the hardware clock. -- Cort
121 * sheets anyway ... -- Markus Kuhn in chrp_set_rtc_time()
127 return 0; in chrp_set_rtc_time()
132 unsigned int year, mon, day, hour, min, sec; in chrp_get_rtc_time() local
139 mon = chrp_cmos_clock_read(RTC_MONTH); in chrp_get_rtc_time()
148 mon = bcd2bin(mon); 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()