/openbmc/u-boot/drivers/rtc/ |
H A D | ds1307.c | 130 tmp->tm_wday = bcd2bin ((wday - 1) & 0x07); in rtc_get() 135 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 148 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 158 bin2bcd (tmp->tm_wday + 1) | MCP7941X_BIT_VBATEN); in rtc_set() 160 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set() 215 tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_wday, in ds1307_rtc_set() 223 buf[RTC_DAY_REG_ADDR] = bin2bcd(tm->tm_wday + 1); in ds1307_rtc_set() 288 tm->tm_wday = bcd2bin((buf[RTC_DAY_REG_ADDR] - 1) & 0x07); in ds1307_rtc_get() 293 tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_wday, in ds1307_rtc_get()
|
H A D | max6900.c | 70 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get() 75 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 85 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 92 rtc_write (0x8a, bin2bcd(tmp->tm_wday)); in rtc_set()
|
H A D | pcf8563.c | 57 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get() 62 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 73 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 81 rtc_write (0x06, bin2bcd(tmp->tm_wday)); in rtc_set()
|
H A D | sandbox_rtc.c | 36 time->tm_wday = dm_i2c_reg_read(dev, REG_WDAY); in sandbox_rtc_get() 37 if (time->tm_wday < 0) in sandbox_rtc_get() 38 return time->tm_wday; in sandbox_rtc_get() 65 ret = dm_i2c_reg_write(dev, REG_WDAY, time->tm_wday); in sandbox_rtc_set()
|
H A D | davinci.c | 45 tmp->tm_wday = bcd2bin(wday & 0x07); in rtc_get() 50 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 61 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 66 writel(bin2bcd(tmp->tm_wday), &rtc->dotw); in rtc_set()
|
H A D | pt7c4338.c | 94 tmp->tm_wday = bcd2bin((wday - 1) & 0x07); in rtc_get() 98 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 108 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 113 rtc_write(RTC_DAY_REG_ADDR, bin2bcd(tmp->tm_wday + 1)); in rtc_set()
|
H A D | x1205.c | 106 tm->tm_wday = buf[CCR_WDAY]; in rtc_get() 112 tm->tm_mday, tm->tm_mon, tm->tm_year, tm->tm_wday); in rtc_get() 123 tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_wday, in rtc_set() 139 buf[CCR_WDAY] = tm->tm_wday & 0x07; in rtc_set()
|
H A D | m48t35ax.c | 58 tmp->tm_wday = bcd2bin (cent_day & 0x07); in rtc_get() 63 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 75 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 88 rtc_write (0x04, bin2bcd(tmp->tm_wday) | century); in rtc_set()
|
H A D | ds3231.c | 93 tmp->tm_wday = bcd2bin ((wday - 1) & 0x07); in rtc_get() 98 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 113 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 121 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
|
H A D | ds1306.c | 113 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 152 soft_spi_send (bin2bcd (tmp->tm_wday)); /* Send Day of the Week */ in rtc_set() 187 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 339 tmp->tm_wday = bcd2bin (wday & 0x07) - 1; /* convert Day of the Week */ in rtc_get() 344 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 367 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 373 rtc_write (RTC_DAY_OF_WEEK, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
|
H A D | s35392a.c | 142 if ((tm->tm_wday < 0) || (tm->tm_wday > 6)) in validate_time() 216 tm->tm_wday = bcd2bin(date[S35390A_BYTE_WDAY]); in s35392a_rtc_get() 222 tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_wday, in s35392a_rtc_get() 236 tm->tm_year, tm->tm_mon, tm->tm_mday, tm->tm_wday, in s35392a_rtc_set() 257 date[S35390A_BYTE_WDAY] = bin2bcd(tm->tm_wday); in s35392a_rtc_set()
|
H A D | m41t11.c | 108 tmp->tm_wday = bcd2bin (data[RTC_DAY_ADDR] & 0x07); in rtc_get() 113 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 124 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 132 data[RTC_DAY_ADDR] = bin2bcd(tmp->tm_wday) & 0x07; in rtc_set()
|
H A D | rx8025.c | 126 tmp->tm_wday = bcd2bin (wday & 0x07); in rtc_get() 131 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 143 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 151 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday)); in rtc_set()
|
H A D | ds1337.c | 107 tmp->tm_wday = bcd2bin ((wday - 1) & 0x07); in rtc_get() 112 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 127 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 135 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
|
H A D | ds164x.c | 85 tmp->tm_wday = bcd2bin( wday & 0x07 ); in rtc_get() 94 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 107 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 116 rtc_write( RTC_DAY_OF_WEEK, bin2bcd( tmp->tm_wday )); in rtc_set()
|
H A D | isl1208.c | 103 tmp->tm_wday = bcd2bin(buf[RTC_DAY_REG_ADDR] & 0x07); in isl1208_rtc_get() 108 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in isl1208_rtc_get() 123 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in isl1208_rtc_set() 142 buf[RTC_DAY_REG_ADDR] = bin2bcd(tmp->tm_wday); in isl1208_rtc_set()
|
H A D | ds1556.c | 88 tmp->tm_wday = bcd2bin( wday & 0x07 ); in rtc_get() 98 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 109 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 118 rtc_write( RTC_DAY_OF_WEEK, bin2bcd( tmp->tm_wday )); in rtc_set()
|
H A D | ds174x.c | 83 tmp->tm_wday = bcd2bin( wday & 0x07 ); in rtc_get() 93 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 104 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 113 rtc_write( RTC_DAY_OF_WEEK, bin2bcd( tmp->tm_wday )); in rtc_set()
|
H A D | m41t60.c | 159 tmp->tm_wday = bcd2bin(data[RTC_DAY] & 0x07) - 1; in rtc_get() 164 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_get() 178 tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_wday, in rtc_set() 188 data[RTC_DAY] = bin2bcd(tmp->tm_wday + 1) & 0x07; in rtc_set()
|
/openbmc/u-boot/include/linux/ |
H A D | time.h | 35 int tm_wday; /* Day of week. [0-6] */ member 62 day_name[tim_p->tm_wday], 104 if ((res->tm_wday = ((EPOCH_WDAY + days) % DAYSPERWEEK)) < 0) 105 res->tm_wday += DAYSPERWEEK;
|
/openbmc/linux/arch/mips/sibyte/swarm/ |
H A D | rtc_m41t81.c | 165 if (tm.tm_wday == 0) tm.tm_wday = 7; in m41t81_set_time() 166 tm.tm_wday = bin2bcd(tm.tm_wday); in m41t81_set_time() 167 m41t81_write(M41T81REG_DY, tm.tm_wday); in m41t81_set_time()
|
/openbmc/linux/drivers/rtc/ |
H A D | rtc-s35390a.c | 220 tm->tm_wday); in s35390a_rtc_set_time() 228 buf[S35390A_BYTE_WDAY] = bin2bcd(tm->tm_wday); in s35390a_rtc_set_time() 261 tm->tm_wday = bcd2bin(buf[S35390A_BYTE_WDAY]); in s35390a_rtc_read_time() 269 tm->tm_wday); in s35390a_rtc_read_time() 284 alm->time.tm_mon, alm->time.tm_year, alm->time.tm_wday); in s35390a_rtc_set_alarm() 306 if (alm->time.tm_wday != -1) in s35390a_rtc_set_alarm() 307 buf[S35390A_ALRM_BYTE_WDAY] = bin2bcd(alm->time.tm_wday) | 0x80; in s35390a_rtc_set_alarm() 362 alm->time.tm_wday = in s35390a_rtc_read_alarm() 378 alm->time.tm_wday); in s35390a_rtc_read_alarm()
|
H A D | rtc-m41t94.c | 38 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t94_set_time() 44 buf[M41T94_REG_WDAY] = bin2bcd(tm->tm_wday + 1); in m41t94_set_time() 86 tm->tm_wday = bcd2bin(spi_w8r8(spi, M41T94_REG_WDAY)) - 1; in m41t94_read_time() 97 tm->tm_mon, tm->tm_year, tm->tm_wday); in m41t94_read_time()
|
H A D | rtc-rzn1.c | 72 tm->tm_wday = readl(rtc->base + RZN1_RTC_WEEKC); in rzn1_rtc_get_time_snapshot() 112 tm->tm_wday = bcd2bin(tm->tm_wday); in rzn1_rtc_read_time() 129 tm->tm_wday = bin2bcd(rzn1_rtc_tm_to_wday(tm)); in rzn1_rtc_set_time() 150 writel(tm->tm_wday, rtc->base + RZN1_RTC_WEEK); in rzn1_rtc_set_time() 203 delta_days = ((fls(wday) - 1) - tm->tm_wday + 7) % 7; in rzn1_rtc_read_alarm() 204 tm->tm_wday = fls(wday) - 1; in rzn1_rtc_read_alarm() 237 wday = (tm_now.tm_wday + days_ahead) % 7; in rzn1_rtc_set_alarm()
|
/openbmc/linux/kernel/time/ |
H A D | timeconv.c | 73 result->tm_wday = (4 + days) % 7; in time64_to_tm() 74 if (result->tm_wday < 0) in time64_to_tm() 75 result->tm_wday += 7; in time64_to_tm()
|