/u-boot/drivers/rtc/ |
A D | max6900.c | 65 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get() 66 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get() 67 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get() 68 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get() 69 tmp->tm_mon = bcd2bin (mon & 0x1F); in rtc_get() 70 tmp->tm_year = bcd2bin (year) + bcd2bin(cent) * 100; in rtc_get() 71 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get()
|
A D | pcf8563.c | 54 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get() 55 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get() 56 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get() 57 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get() 58 tmp->tm_mon = bcd2bin (mon_cent & 0x1F); in rtc_get() 60 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get() 150 tmp->tm_sec = bcd2bin(sec & 0x7F); in pcf8563_rtc_get() 151 tmp->tm_min = bcd2bin(min & 0x7F); in pcf8563_rtc_get() 152 tmp->tm_hour = bcd2bin(hour & 0x3F); in pcf8563_rtc_get() 153 tmp->tm_mday = bcd2bin(mday & 0x3F); in pcf8563_rtc_get() [all …]
|
A D | pt7c4338.c | 92 tmp->tm_sec = bcd2bin(sec & 0x7F); in rtc_get() 93 tmp->tm_min = bcd2bin(min & 0x7F); in rtc_get() 94 tmp->tm_hour = bcd2bin(hour & 0x3F); in rtc_get() 95 tmp->tm_mday = bcd2bin(mday & 0x3F); in rtc_get() 96 tmp->tm_mon = bcd2bin(mon & 0x1F); in rtc_get() 97 tmp->tm_year = bcd2bin(year) + 2000; in rtc_get() 171 tmp->tm_sec = bcd2bin(sec & 0x7F); in pt7c4338_rtc_get() 172 tmp->tm_min = bcd2bin(min & 0x7F); in pt7c4338_rtc_get() 173 tmp->tm_hour = bcd2bin(hour & 0x3F); in pt7c4338_rtc_get() 174 tmp->tm_mday = bcd2bin(mday & 0x3F); in pt7c4338_rtc_get() [all …]
|
A D | ds1306.c | 81 tmp->tm_sec = bcd2bin (soft_spi_read ()); /* Read seconds */ in rtc_get() 90 tmp->tm_hour = (bcd2bin (spi_byte & 0x1F)) + 11; in rtc_get() 93 tmp->tm_hour = (bcd2bin (spi_byte & 0x1F)) - 1; in rtc_get() 97 tmp->tm_hour = (bcd2bin (spi_byte & 0x3F)); in rtc_get() 102 tmp->tm_mon = bcd2bin (soft_spi_read ()); /* Read Month */ in rtc_get() 105 tmp->tm_year = bcd2bin (soft_spi_read ()) + 2000; in rtc_get() 332 ? bcd2bin (hour & 0x1F) + 11 /* PM */ in rtc_get() 333 : bcd2bin (hour & 0x1F) - 1 /* AM */ in rtc_get() 335 : bcd2bin (hour & 0x3F); /* 24 hour mode */ in rtc_get() 338 tmp->tm_mon = bcd2bin (mon & 0x1F); /* convert Month */ in rtc_get() [all …]
|
A D | davinci.c | 41 tmp->tm_sec = bcd2bin(sec & 0x7F); in rtc_get() 42 tmp->tm_min = bcd2bin(min & 0x7F); in rtc_get() 43 tmp->tm_hour = bcd2bin(hour & 0x3F); in rtc_get() 44 tmp->tm_mday = bcd2bin(mday & 0x3F); in rtc_get() 45 tmp->tm_mon = bcd2bin(mon_cent & 0x1F); in rtc_get() 46 tmp->tm_year = bcd2bin(year) + 2000; in rtc_get() 47 tmp->tm_wday = bcd2bin(wday & 0x07); in rtc_get()
|
A D | ds3231.c | 93 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get() 94 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get() 95 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get() 96 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get() 97 tmp->tm_mon = bcd2bin (mon_cent & 0x1F); in rtc_get() 99 tmp->tm_wday = bcd2bin ((wday - 1) & 0x07); in rtc_get() 198 tmp->tm_sec = bcd2bin(sec & 0x7F); in ds3231_rtc_get() 199 tmp->tm_min = bcd2bin(min & 0x7F); in ds3231_rtc_get() 200 tmp->tm_hour = bcd2bin(hour & 0x3F); in ds3231_rtc_get() 201 tmp->tm_mday = bcd2bin(mday & 0x3F); in ds3231_rtc_get() [all …]
|
A D | ds1307.c | 127 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get() 128 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get() 129 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get() 130 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get() 131 tmp->tm_mon = bcd2bin (mon & 0x1F); in rtc_get() 132 tmp->tm_year = bcd2bin (year) + ( bcd2bin (year) >= 70 ? 1900 : 2000); in rtc_get() 133 tmp->tm_wday = bcd2bin ((wday - 1) & 0x07); in rtc_get() 295 tm->tm_sec = bcd2bin(buf[RTC_SEC_REG_ADDR] & 0x7F); in ds1307_rtc_get() 297 tm->tm_hour = bcd2bin(buf[RTC_HR_REG_ADDR] & 0x3F); in ds1307_rtc_get() 300 tm->tm_year = bcd2bin(buf[RTC_YR_REG_ADDR]) + in ds1307_rtc_get() [all …]
|
A D | mvrtc.c | 40 t->tm_sec = bcd2bin((time >> MVRTC_SEC_SFT) & MVRTC_SEC_MSK); in __mv_rtc_get() 41 t->tm_min = bcd2bin((time >> MVRTC_MIN_SFT) & MVRTC_MIN_MSK); in __mv_rtc_get() 42 t->tm_hour = bcd2bin((time >> MVRTC_HOUR_SFT) & MVRTC_HOUR_MSK); in __mv_rtc_get() 43 t->tm_wday = bcd2bin((time >> MVRTC_DAY_SFT) & MVRTC_DAY_MSK); in __mv_rtc_get() 47 t->tm_mday = bcd2bin((date >> MVRTC_DATE_SFT) & MVRTC_DATE_MSK); in __mv_rtc_get() 48 t->tm_mon = bcd2bin((date >> MVRTC_MON_SFT) & MVRTC_MON_MSK); in __mv_rtc_get() 49 t->tm_year = bcd2bin((date >> MVRTC_YEAR_SFT) & MVRTC_YEAR_MSK); in __mv_rtc_get() 115 sec = bcd2bin((time >> MVRTC_SEC_SFT) & MVRTC_SEC_MSK); in __mv_rtc_reset() 119 if (sec == bcd2bin((time >> MVRTC_SEC_SFT) & MVRTC_SEC_MSK)) in __mv_rtc_reset()
|
A D | m41t94.c | 102 tm->tm_sec = bcd2bin(spi_w8r8(slave, M41T94_REG_SECONDS)); in rtc_get() 103 tm->tm_min = bcd2bin(spi_w8r8(slave, M41T94_REG_MINUTES)); in rtc_get() 105 tm->tm_hour = bcd2bin(hour & 0x3f); in rtc_get() 106 tm->tm_wday = bcd2bin(spi_w8r8(slave, M41T94_REG_WDAY)) - 1; in rtc_get() 107 tm->tm_mday = bcd2bin(spi_w8r8(slave, M41T94_REG_DAY)); in rtc_get() 108 tm->tm_mon = bcd2bin(spi_w8r8(slave, M41T94_REG_MONTH)) - 1; in rtc_get() 109 tm->tm_year = bcd2bin(spi_w8r8(slave, M41T94_REG_YEAR)); in rtc_get()
|
A D | m41t11.c | 84 tmp->tm_sec = bcd2bin (data[RTC_SEC_ADDR] & 0x7F); in rtc_get() 85 tmp->tm_min = bcd2bin (data[RTC_MIN_ADDR] & 0x7F); in rtc_get() 86 tmp->tm_hour = bcd2bin (data[RTC_HOUR_ADDR] & 0x3F); in rtc_get() 87 tmp->tm_mday = bcd2bin (data[RTC_DATE_ADDR] & 0x3F); in rtc_get() 88 tmp->tm_mon = bcd2bin (data[RTC_MONTH_ADDR]& 0x1F); in rtc_get() 91 + bcd2bin(data[RTC_YEARS_ADDR]) in rtc_get() 106 tmp->tm_year =((int)cent*100)+bcd2bin(data[RTC_YEARS_ADDR]); in rtc_get() 109 tmp->tm_wday = bcd2bin (data[RTC_DAY_ADDR] & 0x07); in rtc_get()
|
A D | m48t35ax.c | 52 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get() 53 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get() 54 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get() 55 tmp->tm_mday = bcd2bin (date & 0x3F); in rtc_get() 56 tmp->tm_mon = bcd2bin (month & 0x1F); in rtc_get() 57 tmp->tm_year = bcd2bin (year) + ((cent_day & 0x10) ? 2000 : 1900); in rtc_get() 58 tmp->tm_wday = bcd2bin (cent_day & 0x07); in rtc_get()
|
A D | x1205.c | 100 tm->tm_sec = bcd2bin(buf[CCR_SEC]); in rtc_get() 101 tm->tm_min = bcd2bin(buf[CCR_MIN]); in rtc_get() 102 tm->tm_hour = bcd2bin(buf[CCR_HOUR] & 0x3F); /* hr is 0-23 */ in rtc_get() 103 tm->tm_mday = bcd2bin(buf[CCR_MDAY]); in rtc_get() 104 tm->tm_mon = bcd2bin(buf[CCR_MONTH]); /* mon is 0-11 */ in rtc_get() 105 tm->tm_year = bcd2bin(buf[CCR_YEAR]) in rtc_get() 106 + (bcd2bin(buf[CCR_Y2K]) * 100); in rtc_get()
|
A D | ds1337.c | 105 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get() 106 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get() 107 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get() 108 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get() 109 tmp->tm_mon = bcd2bin (mon_cent & 0x1F); in rtc_get() 111 tmp->tm_wday = bcd2bin ((wday - 1) & 0x07); in rtc_get() 239 tmp->tm_sec = bcd2bin(sec & 0x7F); in ds1337_rtc_get() 240 tmp->tm_min = bcd2bin(min & 0x7F); in ds1337_rtc_get() 241 tmp->tm_hour = bcd2bin(hour & 0x3F); in ds1337_rtc_get() 242 tmp->tm_mday = bcd2bin(mday & 0x3F); in ds1337_rtc_get() [all …]
|
A D | ds1556.c | 83 tmp->tm_sec = bcd2bin( sec & 0x7F ); in rtc_get() 84 tmp->tm_min = bcd2bin( min & 0x7F ); in rtc_get() 85 tmp->tm_hour = bcd2bin( hour & 0x3F ); in rtc_get() 86 tmp->tm_mday = bcd2bin( mday & 0x3F ); in rtc_get() 87 tmp->tm_mon = bcd2bin( mon & 0x1F ); in rtc_get() 88 tmp->tm_wday = bcd2bin( wday & 0x07 ); in rtc_get() 91 tmp->tm_year = bcd2bin( year ) + in rtc_get() 92 ( bcd2bin( century & 0x3F ) * 100 ); in rtc_get()
|
A D | ds174x.c | 78 tmp->tm_sec = bcd2bin( sec & 0x7F ); in rtc_get() 79 tmp->tm_min = bcd2bin( min & 0x7F ); in rtc_get() 80 tmp->tm_hour = bcd2bin( hour & 0x3F ); in rtc_get() 81 tmp->tm_mday = bcd2bin( mday & 0x3F ); in rtc_get() 82 tmp->tm_mon = bcd2bin( mon & 0x1F ); in rtc_get() 83 tmp->tm_wday = bcd2bin( wday & 0x07 ); in rtc_get() 86 tmp->tm_year = bcd2bin( year ) + in rtc_get() 87 ( bcd2bin( century & 0x3F ) * 100 ); in rtc_get()
|
A D | rs5c372.c | 55 #define HOURS_12(n) bcd2bin((n) & 0x1F) 56 #define HOURS_24(n) bcd2bin((n) & 0x3F) 120 dt->tm_sec = bcd2bin(buf[1]); in rs5c372_convert_to_time() 121 dt->tm_min = bcd2bin(buf[2]); in rs5c372_convert_to_time() 130 dt->tm_mday = bcd2bin(buf[5]); in rs5c372_convert_to_time() 131 dt->tm_mon = bcd2bin(buf[6]); in rs5c372_convert_to_time() 132 dt->tm_year = bcd2bin(buf[7]); in rs5c372_convert_to_time() 138 dt->tm_wday = bcd2bin(buf[4] & 0x07); in rs5c372_convert_to_time()
|
A D | ds164x.c | 80 tmp->tm_sec = bcd2bin( sec & 0x7F ); in rtc_get() 81 tmp->tm_min = bcd2bin( min & 0x7F ); in rtc_get() 82 tmp->tm_hour = bcd2bin( hour & 0x3F ); in rtc_get() 83 tmp->tm_mday = bcd2bin( mday & 0x3F ); in rtc_get() 84 tmp->tm_mon = bcd2bin( mon & 0x1F ); in rtc_get() 85 tmp->tm_wday = bcd2bin( wday & 0x07 ); in rtc_get() 88 tmp->tm_year = bcd2bin( year ) + RTC_EPOCH; in rtc_get()
|
A D | isl1208.c | 97 tmp->tm_sec = bcd2bin(buf[RTC_SEC_REG_ADDR] & 0x7F); in isl1208_rtc_get() 98 tmp->tm_min = bcd2bin(buf[RTC_MIN_REG_ADDR] & 0x7F); in isl1208_rtc_get() 99 tmp->tm_hour = bcd2bin(buf[RTC_HR_REG_ADDR] & 0x3F); in isl1208_rtc_get() 100 tmp->tm_mday = bcd2bin(buf[RTC_DATE_REG_ADDR] & 0x3F); in isl1208_rtc_get() 101 tmp->tm_mon = bcd2bin(buf[RTC_MON_REG_ADDR] & 0x1F); in isl1208_rtc_get() 102 tmp->tm_year = bcd2bin(buf[RTC_YR_REG_ADDR]) + 2000; in isl1208_rtc_get() 103 tmp->tm_wday = bcd2bin(buf[RTC_DAY_REG_ADDR] & 0x07); in isl1208_rtc_get()
|
A D | pcf2127.c | 88 tm->tm_sec = bcd2bin(buf[PCF2127_REG_SC] & 0x7F); in pcf2127_rtc_get() 89 tm->tm_min = bcd2bin(buf[PCF2127_REG_MN] & 0x7F); in pcf2127_rtc_get() 90 tm->tm_hour = bcd2bin(buf[PCF2127_REG_HR] & 0x3F); in pcf2127_rtc_get() 91 tm->tm_mday = bcd2bin(buf[PCF2127_REG_DM] & 0x3F); in pcf2127_rtc_get() 92 tm->tm_mon = bcd2bin(buf[PCF2127_REG_MO] & 0x1F); in pcf2127_rtc_get() 93 tm->tm_year = bcd2bin(buf[PCF2127_REG_YR]) + 1900; in pcf2127_rtc_get()
|
A D | rx8025.c | 143 tmp->tm_sec = bcd2bin(sec & 0x7F); 144 tmp->tm_min = bcd2bin(min & 0x7F); 146 tmp->tm_hour = bcd2bin(hour & 0x3F); 148 tmp->tm_hour = bcd2bin(hour & 0x1F) % 12 + 151 tmp->tm_mday = bcd2bin (mday & 0x3F); 152 tmp->tm_mon = bcd2bin (mon & 0x1F); 153 tmp->tm_year = bcd2bin (year) + ( bcd2bin (year) >= 70 ? 1900 : 2000); 154 tmp->tm_wday = bcd2bin (wday & 0x07);
|
A D | m41t60.c | 155 tmp->tm_sec = bcd2bin(data[RTC_SEC] & 0x7F); in rtc_get() 156 tmp->tm_min = bcd2bin(data[RTC_MIN] & 0x7F); in rtc_get() 157 tmp->tm_hour = bcd2bin(data[RTC_HOUR] & 0x3F); in rtc_get() 158 tmp->tm_mday = bcd2bin(data[RTC_DATE] & 0x3F); in rtc_get() 159 tmp->tm_mon = bcd2bin(data[RTC_MONTH] & 0x1F); in rtc_get() 160 tmp->tm_year = cb2year(data[RTC_MONTH] >> 6) + bcd2bin(data[RTC_YEAR]); in rtc_get() 161 tmp->tm_wday = bcd2bin(data[RTC_DAY] & 0x07) - 1; in rtc_get()
|
A D | mk48t59.c | 105 tmp->tm_sec = bcd2bin (sec & 0x7F); in rtc_get() 106 tmp->tm_min = bcd2bin (min & 0x7F); in rtc_get() 107 tmp->tm_hour = bcd2bin (hour & 0x3F); in rtc_get() 108 tmp->tm_mday = bcd2bin (mday & 0x3F); in rtc_get() 109 tmp->tm_mon = bcd2bin (mon & 0x1F); in rtc_get() 110 tmp->tm_year = bcd2bin (year); in rtc_get() 111 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get()
|
A D | s3c24x0_rtc.c | 85 tmp->tm_sec = bcd2bin(sec & 0x7F); in rtc_get() 86 tmp->tm_min = bcd2bin(min & 0x7F); in rtc_get() 87 tmp->tm_hour = bcd2bin(hour & 0x3F); in rtc_get() 88 tmp->tm_mday = bcd2bin(mday & 0x3F); in rtc_get() 89 tmp->tm_mon = bcd2bin(mon & 0x1F); in rtc_get() 90 tmp->tm_year = bcd2bin(year); in rtc_get() 91 tmp->tm_wday = bcd2bin(wday & 0x07); in rtc_get()
|
A D | ds3232.c | 183 tm->tm_sec = bcd2bin(buf[RTC_SEC_REG_ADDR] & 0x7F); in ds3232_rtc_get() 184 tm->tm_min = bcd2bin(buf[RTC_MIN_REG_ADDR] & 0x7F); in ds3232_rtc_get() 187 tm->tm_hour = bcd2bin(buf[RTC_HR_REG_ADDR] & 0x1F) in ds3232_rtc_get() 190 tm->tm_hour = bcd2bin(buf[RTC_HR_REG_ADDR]); in ds3232_rtc_get() 192 tm->tm_wday = bcd2bin((buf[RTC_DAY_REG_ADDR] & 0x07) - 1); in ds3232_rtc_get() 193 tm->tm_mday = bcd2bin(buf[RTC_DATE_REG_ADDR] & 0x3F); in ds3232_rtc_get() 194 tm->tm_mon = bcd2bin((buf[RTC_MON_REG_ADDR] & 0x7F)); in ds3232_rtc_get() 195 tm->tm_year = bcd2bin(buf[RTC_YR_REG_ADDR]) in ds3232_rtc_get()
|
A D | rv8803.c | 89 tm->tm_sec = bcd2bin(buf[RTC_SEC_REG_ADDR] & 0x7F); in rv8803_rtc_get() 90 tm->tm_min = bcd2bin(buf[RTC_MIN_REG_ADDR] & 0x7F); in rv8803_rtc_get() 91 tm->tm_hour = bcd2bin(buf[RTC_HR_REG_ADDR] & 0x3F); in rv8803_rtc_get() 92 tm->tm_mday = bcd2bin(buf[RTC_DATE_REG_ADDR] & 0x3F); in rv8803_rtc_get() 93 tm->tm_mon = bcd2bin(buf[RTC_MON_REG_ADDR] & 0x1F); in rv8803_rtc_get() 94 tm->tm_year = bcd2bin(buf[RTC_YR_REG_ADDR]) + 2000; in rv8803_rtc_get()
|