Home
last modified time | relevance | path

Searched refs:to_bcd (Results 1 – 8 of 8) sorted by relevance

/openbmc/qemu/hw/rtc/
H A Dm41t80.c61 return to_bcd((rt % G_USEC_PER_SEC) / 10000); in m41t80_recv()
63 return to_bcd(now.tm_sec); in m41t80_recv()
65 return to_bcd(now.tm_min); in m41t80_recv()
67 return to_bcd(now.tm_hour); in m41t80_recv()
69 return to_bcd(now.tm_wday); in m41t80_recv()
71 return to_bcd(now.tm_mday); in m41t80_recv()
73 return to_bcd(now.tm_mon + 1); in m41t80_recv()
75 return to_bcd(now.tm_year % 100); in m41t80_recv()
H A Dds1338.c67 s->nvram[0] = to_bcd(now.tm_sec); in capture_current_time()
68 s->nvram[1] = to_bcd(now.tm_min); in capture_current_time()
75 s->nvram[2] = HOURS_12 | to_bcd(tmp); in capture_current_time()
77 s->nvram[2] = HOURS_12 | HOURS_PM | to_bcd(tmp - 12); in capture_current_time()
80 s->nvram[2] = to_bcd(now.tm_hour); in capture_current_time()
83 s->nvram[4] = to_bcd(now.tm_mday); in capture_current_time()
84 s->nvram[5] = to_bcd(now.tm_mon + 1); in capture_current_time()
85 s->nvram[6] = to_bcd(now.tm_year - 100); in capture_current_time()
H A Dexynos4210_rtc.c152 ((uint32_t)to_bcd((uint8_t)(x % 100)) + \
153 ((uint32_t)to_bcd((uint8_t)((x % 1000) / 100)) << 8))
161 (to_bcd((uint8_t)stm.tm_sec) == (uint8_t)s->reg_almsec)) { in check_alarm_raise()
165 (to_bcd((uint8_t)stm.tm_min) == (uint8_t)s->reg_almmin)) { in check_alarm_raise()
173 (to_bcd((uint8_t)stm.tm_mday) == (uint8_t)s->reg_almday)) { in check_alarm_raise()
177 (to_bcd((uint8_t)stm.tm_mon) == (uint8_t)s->reg_almmon)) { in check_alarm_raise()
349 value = (uint32_t)to_bcd((uint8_t)s->current_tm.tm_sec); in exynos4210_rtc_read()
352 value = (uint32_t)to_bcd((uint8_t)s->current_tm.tm_min); in exynos4210_rtc_read()
355 value = (uint32_t)to_bcd((uint8_t)s->current_tm.tm_hour); in exynos4210_rtc_read()
358 value = (uint32_t)to_bcd((uint8_t)s->current_tm.tm_wday); in exynos4210_rtc_read()
[all …]
H A Dtwl92230.c331 return to_bcd(s->rtc.tm.tm_sec); in menelaus_read()
334 return to_bcd(s->rtc.tm.tm_min); in menelaus_read()
341 return to_bcd(s->rtc.tm.tm_hour); in menelaus_read()
344 return to_bcd(s->rtc.tm.tm_mday); in menelaus_read()
347 return to_bcd(s->rtc.tm.tm_mon + 1); in menelaus_read()
353 return to_bcd(s->rtc.tm.tm_wday); in menelaus_read()
355 return to_bcd(s->rtc.alm.tm_sec); in menelaus_read()
357 return to_bcd(s->rtc.alm.tm_min); in menelaus_read()
363 return to_bcd(s->rtc.alm.tm_hour); in menelaus_read()
365 return to_bcd(s->rtc.alm.tm_mday); in menelaus_read()
[all …]
H A Dm48t59.c402 retval = (NVRAM->buffer[addr] & 0x80) | to_bcd(tm.tm_sec); in m48t59_read()
408 retval = to_bcd(tm.tm_min); in m48t59_read()
414 retval = to_bcd(tm.tm_hour); in m48t59_read()
426 retval = to_bcd(tm.tm_mday); in m48t59_read()
432 retval = to_bcd(tm.tm_mon + 1); in m48t59_read()
438 retval = to_bcd((tm.tm_year + 1900 - NVRAM->base_year) % 100); in m48t59_read()
/openbmc/qemu/include/qemu/
H A Dbcd.h5 static inline uint8_t to_bcd(uint8_t val) in to_bcd() function
/openbmc/qemu/hw/ppc/
H A Dspapr_events.c522 maina->creation_date = cpu_to_be32((to_bcd(year / 100) << 24) in spapr_init_maina()
523 | (to_bcd(year % 100) << 16) in spapr_init_maina()
524 | (to_bcd(tm.tm_mon + 1) << 8) in spapr_init_maina()
525 | to_bcd(tm.tm_mday)); in spapr_init_maina()
526 maina->creation_time = cpu_to_be32((to_bcd(tm.tm_hour) << 24) in spapr_init_maina()
527 | (to_bcd(tm.tm_min) << 16) in spapr_init_maina()
528 | (to_bcd(tm.tm_sec) << 8)); in spapr_init_maina()
/openbmc/qemu/hw/arm/
H A Domap1.c2590 return to_bcd(s->current_tm.tm_sec); in omap_rtc_read()
2593 return to_bcd(s->current_tm.tm_min); in omap_rtc_read()
2600 return to_bcd(s->current_tm.tm_hour); in omap_rtc_read()
2603 return to_bcd(s->current_tm.tm_mday); in omap_rtc_read()
2606 return to_bcd(s->current_tm.tm_mon + 1); in omap_rtc_read()
2615 return to_bcd(s->alarm_tm.tm_sec); in omap_rtc_read()
2618 return to_bcd(s->alarm_tm.tm_min); in omap_rtc_read()
2625 return to_bcd(s->alarm_tm.tm_hour); in omap_rtc_read()
2628 return to_bcd(s->alarm_tm.tm_mday); in omap_rtc_read()
2631 return to_bcd(s->alarm_tm.tm_mon + 1); in omap_rtc_read()
[all …]