Home
last modified time | relevance | path

Searched refs:bct (Results 1 – 15 of 15) sorted by relevance

/src/sys/kern/ !
H A Dsubr_clock.c195 clock_bcd_to_ts(const struct bcd_clocktime *bct, struct timespec *ts, bool ampm) in clock_bcd_to_ts() argument
204 bcent = bct->year >> 8; in clock_bcd_to_ts()
205 byear = bct->year & 0xff; in clock_bcd_to_ts()
212 if (!validbcd(bcent) || !validbcd(byear) || !validbcd(bct->mon) || in clock_bcd_to_ts()
213 !validbcd(bct->day) || !validbcd(bct->hour) || in clock_bcd_to_ts()
214 !validbcd(bct->min) || !validbcd(bct->sec)) { in clock_bcd_to_ts()
218 bct->year, bct->mon, bct->day, in clock_bcd_to_ts()
219 bct->hour, bct->min, bct->sec); in clock_bcd_to_ts()
224 ct.mon = FROMBCD(bct->mon); in clock_bcd_to_ts()
225 ct.day = FROMBCD(bct->day); in clock_bcd_to_ts()
[all …]
H A Dsubr_rtc.c168 clock_dbgprint_bcd(device_t dev, int rw, const struct bcd_clocktime *bct) in clock_dbgprint_bcd() argument
173 clock_print_bcd(bct, 9); in clock_dbgprint_bcd()
/src/sys/dev/iicbus/pmic/rockchip/ !
H A Drk8xx_rtc.c40 struct bcd_clocktime bct; in rk8xx_gettime() local
83 memset(&bct, 0, sizeof(bct)); in rk8xx_gettime()
84 bct.year = data[sc->rtc_regs.years]; in rk8xx_gettime()
85 bct.mon = data[sc->rtc_regs.months] & sc->rtc_regs.months_mask; in rk8xx_gettime()
86 bct.day = data[sc->rtc_regs.days] & sc->rtc_regs.days_mask; in rk8xx_gettime()
87 bct.hour = data[sc->rtc_regs.hours] & sc->rtc_regs.hours_mask; in rk8xx_gettime()
88 bct.min = data[sc->rtc_regs.minutes] & sc->rtc_regs.minutes_mask; in rk8xx_gettime()
89 bct.sec = data[sc->rtc_regs.secs] & sc->rtc_regs.secs_mask; in rk8xx_gettime()
90 bct.dow = data[sc->rtc_regs.weeks] & sc->rtc_regs.weeks_mask; in rk8xx_gettime()
92 if (bct.dow == 7) in rk8xx_gettime()
[all …]
/src/sys/dev/iicbus/rtc/ !
H A Ds35390a.c298 struct bcd_clocktime bct; in s390rtc_gettime() local
311 bct.nsec = 0; in s390rtc_gettime()
312 bct.sec = bcd[S390_RT1_SECOND]; in s390rtc_gettime()
313 bct.min = bcd[S390_RT1_MINUTE]; in s390rtc_gettime()
314 bct.hour = bcd[S390_RT1_HOUR] & 0x3f; in s390rtc_gettime()
315 bct.day = bcd[S390_RT1_DAY]; in s390rtc_gettime()
316 bct.dow = bcd[S390_RT1_WDAY] & 0x07; in s390rtc_gettime()
317 bct.mon = bcd[S390_RT1_MONTH]; in s390rtc_gettime()
318 bct.year = bcd[S390_RT1_YEAR]; in s390rtc_gettime()
320 clock_dbgprint_bcd(dev, CLOCK_DBG_READ, &bct); in s390rtc_gettime()
[all …]
H A Disl12xx.c236 struct bcd_clocktime bct; in isl12xx_gettime() local
266 bct.nsec = 0; in isl12xx_gettime()
267 bct.sec = tregs.sec; in isl12xx_gettime()
268 bct.min = tregs.min; in isl12xx_gettime()
269 bct.hour = tregs.hour & hourmask; in isl12xx_gettime()
270 bct.day = tregs.day; in isl12xx_gettime()
271 bct.mon = tregs.month; in isl12xx_gettime()
272 bct.year = tregs.year; in isl12xx_gettime()
273 bct.ispm = tregs.hour & ISL12XX_PM_FLAG; in isl12xx_gettime()
275 clock_dbgprint_bcd(sc->dev, CLOCK_DBG_READ, &bct); in isl12xx_gettime()
[all …]
H A Drtc8583.c193 struct bcd_clocktime bct; in rtc8583_gettime() local
234 bct.nsec = bcd2bin(tregs.msec) * 10 * 1000 * 1000; in rtc8583_gettime()
235 bct.sec = tregs.sec; in rtc8583_gettime()
236 bct.min = tregs.min; in rtc8583_gettime()
237 bct.hour = tregs.hour & 0x3f; in rtc8583_gettime()
238 bct.day = tregs.day & 0x3f; in rtc8583_gettime()
239 bct.mon = tregs.month & 0x1f; in rtc8583_gettime()
240 bct.year = bin2bcd(sreg % 100); in rtc8583_gettime()
242 clock_dbgprint_bcd(sc->dev, CLOCK_DBG_READ, &bct); in rtc8583_gettime()
243 return (clock_bcd_to_ts(&bct, ts, false)); in rtc8583_gettime()
[all …]
H A Dds13rtc.c347 struct bcd_clocktime bct; in ds13rtc_gettime() local
381 bct.nsec = 0; in ds13rtc_gettime()
382 bct.ispm = tregs.hour & DS13xx_B_HOUR_PM; in ds13rtc_gettime()
383 bct.sec = tregs.sec & DS13xx_M_SECOND; in ds13rtc_gettime()
384 bct.min = tregs.min & DS13xx_M_MINUTE; in ds13rtc_gettime()
385 bct.hour = tregs.hour & hourmask; in ds13rtc_gettime()
386 bct.day = tregs.day & DS13xx_M_DAY; in ds13rtc_gettime()
387 bct.mon = tregs.month & DS13xx_M_MONTH; in ds13rtc_gettime()
388 bct.year = tregs.year & DS13xx_M_YEAR; in ds13rtc_gettime()
395 bct.year += (tregs.month & DS13xx_B_MONTH_CENTURY) ? 0x100 : 0; in ds13rtc_gettime()
[all …]
H A Dhym8563.c305 struct bcd_clocktime bct; in hym8563_gettime() local
326 bzero(&bct, sizeof(bct)); in hym8563_gettime()
327 bct.sec = buf[0] & 0x7F; in hym8563_gettime()
328 bct.min = buf[1] & 0x7F; in hym8563_gettime()
329 bct.hour = buf[2] & 0x3f; in hym8563_gettime()
330 bct.day = buf[3] & 0x3f; in hym8563_gettime()
332 bct.mon = buf[5] & 0x1f; in hym8563_gettime()
333 bct.year = buf[6] & 0xff; in hym8563_gettime()
335 bct.year += 0x100; in hym8563_gettime()
337 clock_dbgprint_bcd(sc->dev, CLOCK_DBG_READ, &bct); in hym8563_gettime()
[all …]
H A Dds1307.c452 struct bcd_clocktime bct; in ds1307_gettime() local
487 bct.nsec = 0; in ds1307_gettime()
488 bct.ispm = (data[DS1307_HOUR] & DS1307_HOUR_IS_PM) != 0; in ds1307_gettime()
489 bct.sec = data[DS1307_SECS] & DS1307_SECS_MASK; in ds1307_gettime()
490 bct.min = data[DS1307_MINS] & DS1307_MINS_MASK; in ds1307_gettime()
491 bct.hour = data[DS1307_HOUR] & hourmask; in ds1307_gettime()
492 bct.day = data[DS1307_DATE] & DS1307_DATE_MASK; in ds1307_gettime()
493 bct.mon = data[DS1307_MONTH] & DS1307_MONTH_MASK; in ds1307_gettime()
494 bct.year = data[DS1307_YEAR] & DS1307_YEAR_MASK; in ds1307_gettime()
496 clock_dbgprint_bcd(sc->sc_dev, CLOCK_DBG_READ, &bct); in ds1307_gettime()
[all …]
H A Dds3231.c482 struct bcd_clocktime bct; in ds3231_gettime() local
510 bct.nsec = 0; in ds3231_gettime()
511 bct.sec = data[DS3231_SECS] & DS3231_SECS_MASK; in ds3231_gettime()
512 bct.min = data[DS3231_MINS] & DS3231_MINS_MASK; in ds3231_gettime()
513 bct.hour = data[DS3231_HOUR] & hourmask; in ds3231_gettime()
514 bct.day = data[DS3231_DATE] & DS3231_DATE_MASK; in ds3231_gettime()
515 bct.mon = data[DS3231_MONTH] & DS3231_MONTH_MASK; in ds3231_gettime()
516 bct.year = data[DS3231_YEAR] & DS3231_YEAR_MASK; in ds3231_gettime()
517 bct.ispm = data[DS3231_HOUR] & DS3231_HOUR_IS_PM; in ds3231_gettime()
531 bct.year |= sc->sc_year0; in ds3231_gettime()
[all …]
H A Dnxprtc.c742 struct bcd_clocktime bct; in nxprtc_gettime() local
775 bct.nsec = ((uint64_t)tmrcount * 1000000000) / TMR_TICKS_SEC; in nxprtc_gettime()
776 bct.ispm = (tregs.hour & PCF8523_B_HOUR_PM) != 0; in nxprtc_gettime()
777 bct.sec = tregs.sec & PCF85xx_M_SECOND; in nxprtc_gettime()
778 bct.min = tregs.min & PCF85xx_M_MINUTE; in nxprtc_gettime()
779 bct.hour = tregs.hour & hourmask; in nxprtc_gettime()
780 bct.day = tregs.day & PCF85xx_M_DAY; in nxprtc_gettime()
781 bct.mon = tregs.month & PCF85xx_M_MONTH; in nxprtc_gettime()
782 bct.year = tregs.year & PCF85xx_M_YEAR; in nxprtc_gettime()
792 if (bct.year < 0x70) in nxprtc_gettime()
[all …]
/src/sys/x86/isa/ !
H A Datrtc.c564 struct bcd_clocktime bct; in atrtc_settime() local
566 clock_ts_to_bcd(ts, &bct, false); in atrtc_settime()
567 clock_dbgprint_bcd(dev, CLOCK_DBG_WRITE, &bct); in atrtc_settime()
576 rtcout_locked(RTC_SEC, bct.sec); in atrtc_settime()
577 rtcout_locked(RTC_MIN, bct.min); in atrtc_settime()
578 rtcout_locked(RTC_HRS, bct.hour); in atrtc_settime()
579 rtcout_locked(RTC_WDAY, bct.dow + 1); in atrtc_settime()
580 rtcout_locked(RTC_DAY, bct.day); in atrtc_settime()
581 rtcout_locked(RTC_MONTH, bct.mon); in atrtc_settime()
582 rtcout_locked(RTC_YEAR, bct.year & 0xff); in atrtc_settime()
[all …]
/src/sys/sys/ !
H A Dclock.h182 void clock_print_bcd(const struct bcd_clocktime *bct, int nsdig);
193 void clock_dbgprint_bcd(device_t dev, int rw, const struct bcd_clocktime *bct);
/src/contrib/llvm-project/llvm/lib/Target/SystemZ/ !
H A DSystemZInstrInfo.td203 def BCT : BranchUnaryRX<"bct", 0x46,GR32>;
/src/share/termcap/ !
H A Dtermcap299 b610|610|610bct|tty610:\