Lines Matching +full:start +full:- +full:year
2 * CDDL HEADER START
73 * Machine-dependent clock routines.
107 if (fadt->DayAlarm) { in pc_tod_set_rtc_offsets()
108 pc_rtc_offset.day_alrm = fadt->DayAlarm; in pc_tod_set_rtc_offsets()
112 if (fadt->MonthAlarm) { in pc_tod_set_rtc_offsets()
113 pc_rtc_offset.mon_alrm = fadt->MonthAlarm; in pc_tod_set_rtc_offsets()
117 if (fadt->Century) { in pc_tod_set_rtc_offsets()
118 pc_rtc_offset.century = fadt->Century; in pc_tod_set_rtc_offsets()
134 todinfo_t tod = utc_to_tod(ts.tv_sec - ggmtl()); in todpc_set()
143 * rtc bytes are in binary-coded decimal, so we have to convert. in todpc_set()
144 * We assume that we wrap the rtc year back to zero at 2000. in todpc_set()
147 tod.tod_year -= YRBASE; in todpc_set()
149 tod.tod_year -= 100; in todpc_set()
150 rtc.rtc_century = BYTE_TO_BCD(20); /* 20xx year */ in todpc_set()
152 rtc.rtc_century = BYTE_TO_BCD(19); /* 19xx year */ in todpc_set()
167 * Assumes that the year in the clock chip is valid.
188 /* assume that we wrap the rtc year back to zero at 2000 */ in todpc_get()
192 cmn_err(CE_WARN, "hardware real-time clock is out " in todpc_get()
193 "of range -- time needs to be reset"); in todpc_get()
196 tod.tod_year += 100 + YRBASE; /* 20xx year */ in todpc_get()
200 tod.tod_year += YRBASE; /* 19xx year */ in todpc_get()
205 "The hardware real-time clock appears to have the " in todpc_get()
258 * and mon. rtc bytes are in binary-coded decimal, so we have in todpc_setalarm()
271 prom_printf("No day alarm - set to end of today!\n"); in todpc_setalarm()
284 prom_printf("No mon alarm - " in todpc_setalarm()
294 adom -= dpm[amon]; in todpc_setalarm()
297 prom_printf("Alarm too far in future - " in todpc_setalarm()
298 "set to end of current year!\n"); in todpc_setalarm()
338 * The routine will also busy wait for the Update-In-Progress flag to clear.
339 * On completion of the reads the Seconds register is re-read and the
368 if (vrt_try-- < 0) in todpc_rtcget()
379 if (uip_try-- < 0) in todpc_rtcget()
393 ((struct rtc_t *)buf)->rtc_century = inb(RTC_DATA); in todpc_rtcget()
397 ((struct rtc_t *)buf)->rtc_adom = inb(RTC_DATA) & 0x3f; in todpc_rtcget()
401 ((struct rtc_t *)buf)->rtc_amon = inb(RTC_DATA); in todpc_rtcget()
404 outb(RTC_ADDR, 0); /* re-read Seconds register */ in todpc_rtcget()
406 if (reg != ((struct rtc_t *)buf)->rtc_sec || in todpc_rtcget()
407 (((struct rtc_t *)buf)->rtc_statusa & RTC_UIP)) in todpc_rtcget()
443 outb(RTC_DATA, ((struct rtc_t *)buf)->rtc_century); in todpc_rtcput()
449 tmp |= ((struct rtc_t *)buf)->rtc_adom & ~RTC_VRT; in todpc_rtcput()
454 outb(RTC_DATA, ((struct rtc_t *)buf)->rtc_amon); in todpc_rtcput()