Home
last modified time | relevance | path

Searched refs:bin2bcd (Results 1 – 25 of 33) sorted by relevance

12

/u-boot/drivers/rtc/
A Dmax6900.c91 rtc_write (0x92, bin2bcd(tmp->tm_year / 100)); in rtc_set()
92 rtc_write (0x8c, bin2bcd(tmp->tm_year % 100)); in rtc_set()
93 rtc_write (0x8a, bin2bcd(tmp->tm_wday)); in rtc_set()
94 rtc_write (0x88, bin2bcd(tmp->tm_mon)); in rtc_set()
95 rtc_write (0x86, bin2bcd(tmp->tm_mday)); in rtc_set()
96 rtc_write (0x84, bin2bcd(tmp->tm_hour)); in rtc_set()
97 rtc_write (0x82, bin2bcd(tmp->tm_min )); in rtc_set()
98 rtc_write (0x80, bin2bcd(tmp->tm_sec )); in rtc_set()
A Dpcf8563.c79 rtc_write (0x08, bin2bcd(tmp->tm_year % 100)); in rtc_set()
82 rtc_write (0x07, bin2bcd(tmp->tm_mon) | century); in rtc_set()
84 rtc_write (0x06, bin2bcd(tmp->tm_wday)); in rtc_set()
85 rtc_write (0x05, bin2bcd(tmp->tm_mday)); in rtc_set()
86 rtc_write (0x04, bin2bcd(tmp->tm_hour)); in rtc_set()
87 rtc_write (0x03, bin2bcd(tmp->tm_min )); in rtc_set()
88 rtc_write (0x02, bin2bcd(tmp->tm_sec )); in rtc_set()
180 dm_i2c_reg_write(dev, 0x06, bin2bcd(tmp->tm_wday)); in pcf8563_rtc_set()
181 dm_i2c_reg_write(dev, 0x05, bin2bcd(tmp->tm_mday)); in pcf8563_rtc_set()
183 dm_i2c_reg_write(dev, 0x03, bin2bcd(tmp->tm_min)); in pcf8563_rtc_set()
[all …]
A Dpt7c4338.c115 rtc_write(RTC_YR_REG_ADDR, bin2bcd(tmp->tm_year % 100)); in rtc_set()
116 rtc_write(RTC_MON_REG_ADDR, bin2bcd(tmp->tm_mon)); in rtc_set()
117 rtc_write(RTC_DAY_REG_ADDR, bin2bcd(tmp->tm_wday + 1)); in rtc_set()
118 rtc_write(RTC_DATE_REG_ADDR, bin2bcd(tmp->tm_mday)); in rtc_set()
119 rtc_write(RTC_HR_REG_ADDR, bin2bcd(tmp->tm_hour)); in rtc_set()
120 rtc_write(RTC_MIN_REG_ADDR, bin2bcd(tmp->tm_min)); in rtc_set()
121 rtc_write(RTC_SEC_REG_ADDR, bin2bcd(tmp->tm_sec)); in rtc_set()
194 rtc_write(dev, RTC_MON_REG_ADDR, bin2bcd(tmp->tm_mon)); in pt7c4338_rtc_set()
197 rtc_write(dev, RTC_HR_REG_ADDR, bin2bcd(tmp->tm_hour)); in pt7c4338_rtc_set()
198 rtc_write(dev, RTC_MIN_REG_ADDR, bin2bcd(tmp->tm_min)); in pt7c4338_rtc_set()
[all …]
A Ddavinci.c65 writel(bin2bcd(tmp->tm_year % 100), &rtc->year); in rtc_set()
66 writel(bin2bcd(tmp->tm_mon), &rtc->month); in rtc_set()
68 writel(bin2bcd(tmp->tm_wday), &rtc->dotw); in rtc_set()
69 writel(bin2bcd(tmp->tm_mday), &rtc->day); in rtc_set()
70 writel(bin2bcd(tmp->tm_hour), &rtc->hours); in rtc_set()
71 writel(bin2bcd(tmp->tm_min), &rtc->minutes); in rtc_set()
72 writel(bin2bcd(tmp->tm_sec), &rtc->second); in rtc_set()
A Dds3231.c122 rtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100)); in rtc_set()
125 rtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon) | century); in rtc_set()
127 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
128 rtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday)); in rtc_set()
129 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
130 rtc_write (RTC_MIN_REG_ADDR, bin2bcd (tmp->tm_min)); in rtc_set()
131 rtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec)); in rtc_set()
229 dm_i2c_reg_write(dev, RTC_DATE_REG_ADDR, bin2bcd(tmp->tm_mday)); in ds3231_rtc_set()
230 dm_i2c_reg_write(dev, RTC_HR_REG_ADDR, bin2bcd(tmp->tm_hour)); in ds3231_rtc_set()
231 dm_i2c_reg_write(dev, RTC_MIN_REG_ADDR, bin2bcd(tmp->tm_min)); in ds3231_rtc_set()
[all …]
A Dds1307.c158 rtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon)); in rtc_set()
166 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
167 rtc_write (RTC_MIN_REG_ADDR, bin2bcd (tmp->tm_min)); in rtc_set()
171 rtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec)); in rtc_set()
224 buf[RTC_YR_REG_ADDR] = bin2bcd(tm->tm_year % 100); in ds1307_rtc_set()
225 buf[RTC_MON_REG_ADDR] = bin2bcd(tm->tm_mon); in ds1307_rtc_set()
226 buf[RTC_DAY_REG_ADDR] = bin2bcd(tm->tm_wday + 1); in ds1307_rtc_set()
227 buf[RTC_DATE_REG_ADDR] = bin2bcd(tm->tm_mday); in ds1307_rtc_set()
228 buf[RTC_HR_REG_ADDR] = bin2bcd(tm->tm_hour); in ds1307_rtc_set()
229 buf[RTC_MIN_REG_ADDR] = bin2bcd(tm->tm_min); in ds1307_rtc_set()
[all …]
A Drs5c372.c213 buf[1] = bin2bcd(tmp->tm_sec); in rtc_set()
214 buf[2] = bin2bcd(tmp->tm_min); in rtc_set()
220 buf[3] = bin2bcd(tmp->tm_hour); in rtc_set()
222 buf[3] = bin2bcd(tmp->tm_hour - 12); in rtc_set()
226 buf[3] = bin2bcd(tmp->tm_hour); in rtc_set()
229 buf[4] = bin2bcd(tmp->tm_wday); in rtc_set()
230 buf[5] = bin2bcd(tmp->tm_mday); in rtc_set()
231 buf[6] = bin2bcd(tmp->tm_mon); in rtc_set()
234 buf[7] = bin2bcd(tmp->tm_year % 100); in rtc_set()
A Dm41t94.c51 buf[M41T94_REG_SECONDS] = bin2bcd(tm->tm_sec); in rtc_set()
52 buf[M41T94_REG_MINUTES] = bin2bcd(tm->tm_min); in rtc_set()
53 buf[M41T94_REG_HOURS] = bin2bcd(tm->tm_hour); in rtc_set()
54 buf[M41T94_REG_WDAY] = bin2bcd(tm->tm_wday + 1); in rtc_set()
55 buf[M41T94_REG_DAY] = bin2bcd(tm->tm_mday); in rtc_set()
56 buf[M41T94_REG_MONTH] = bin2bcd(tm->tm_mon + 1); in rtc_set()
61 buf[M41T94_REG_YEAR] = bin2bcd(tm->tm_year % 100); in rtc_set()
A Dds1306.c149 bin2bcd (tmp->tm_sec); in rtc_set()
150 soft_spi_send (bin2bcd (tmp->tm_sec)); /* Send Seconds */ in rtc_set()
151 soft_spi_send (bin2bcd (tmp->tm_min)); /* Send Minutes */ in rtc_set()
152 soft_spi_send (bin2bcd (tmp->tm_hour)); /* Send Hour */ in rtc_set()
155 soft_spi_send (bin2bcd (tmp->tm_mon)); /* Send Month */ in rtc_set()
371 rtc_write (RTC_SECONDS, bin2bcd (tmp->tm_sec)); in rtc_set()
372 rtc_write (RTC_MINUTES, bin2bcd (tmp->tm_min)); in rtc_set()
373 rtc_write (RTC_HOURS, bin2bcd (tmp->tm_hour)); in rtc_set()
375 rtc_write (RTC_DATE_OF_MONTH, bin2bcd (tmp->tm_mday)); in rtc_set()
376 rtc_write (RTC_MONTH, bin2bcd (tmp->tm_mon)); in rtc_set()
[all …]
A Dm48t35ax.c83 rtc_write (0x07, bin2bcd(tmp->tm_year % 100)); in rtc_set()
84 rtc_write (0x06, bin2bcd(tmp->tm_mon)); in rtc_set()
85 rtc_write (0x05, bin2bcd(tmp->tm_mday)); in rtc_set()
88 rtc_write (0x04, bin2bcd(tmp->tm_wday) | century); in rtc_set()
90 rtc_write (0x03, bin2bcd(tmp->tm_hour)); in rtc_set()
91 rtc_write (0x02, bin2bcd(tmp->tm_min )); in rtc_set()
92 rtc_write (0x01, bin2bcd(tmp->tm_sec )); in rtc_set()
A Dx1205.c127 buf[CCR_SEC] = bin2bcd(tm->tm_sec); in rtc_set()
128 buf[CCR_MIN] = bin2bcd(tm->tm_min); in rtc_set()
131 buf[CCR_HOUR] = bin2bcd(tm->tm_hour) | X1205_HR_MIL; in rtc_set()
133 buf[CCR_MDAY] = bin2bcd(tm->tm_mday); in rtc_set()
136 buf[CCR_MONTH] = bin2bcd(tm->tm_mon); in rtc_set()
139 buf[CCR_YEAR] = bin2bcd(tm->tm_year % 100); in rtc_set()
141 buf[CCR_Y2K] = bin2bcd(tm->tm_year / 100); in rtc_set()
A Dds1337.c134 rtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100)); in rtc_set()
139 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
140 rtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday)); in rtc_set()
141 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
142 rtc_write (RTC_MIN_REG_ADDR, bin2bcd (tmp->tm_min)); in rtc_set()
143 rtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec)); in rtc_set()
269 rtc_write(dev, RTC_DAY_REG_ADDR, bin2bcd(tmp->tm_wday + 1)); in ds1337_rtc_set()
270 rtc_write(dev, RTC_DATE_REG_ADDR, bin2bcd(tmp->tm_mday)); in ds1337_rtc_set()
271 rtc_write(dev, RTC_HR_REG_ADDR, bin2bcd(tmp->tm_hour)); in ds1337_rtc_set()
272 rtc_write(dev, RTC_MIN_REG_ADDR, bin2bcd(tmp->tm_min)); in ds1337_rtc_set()
[all …]
A Dds1556.c116 rtc_write( RTC_MONTH, bin2bcd( tmp->tm_mon )); in rtc_set()
118 rtc_write( RTC_DAY_OF_WEEK, bin2bcd( tmp->tm_wday )); in rtc_set()
119 rtc_write( RTC_DAY_OF_MONTH, bin2bcd( tmp->tm_mday )); in rtc_set()
120 rtc_write( RTC_HOURS, bin2bcd( tmp->tm_hour )); in rtc_set()
121 rtc_write( RTC_MINUTES, bin2bcd( tmp->tm_min )); in rtc_set()
122 rtc_write( RTC_SECONDS, bin2bcd( tmp->tm_sec )); in rtc_set()
125 rtc_write( RTC_YEAR, bin2bcd( tmp->tm_year % 100 )); in rtc_set()
126 rtc_write( RTC_CENTURY, bin2bcd( tmp->tm_year / 100 )); in rtc_set()
A Dds174x.c111 rtc_write( RTC_MONTH, bin2bcd( tmp->tm_mon )); in rtc_set()
113 rtc_write( RTC_DAY_OF_WEEK, bin2bcd( tmp->tm_wday )); in rtc_set()
114 rtc_write( RTC_DAY_OF_MONTH, bin2bcd( tmp->tm_mday )); in rtc_set()
115 rtc_write( RTC_HOURS, bin2bcd( tmp->tm_hour )); in rtc_set()
116 rtc_write( RTC_MINUTES, bin2bcd( tmp->tm_min )); in rtc_set()
117 rtc_write( RTC_SECONDS, bin2bcd( tmp->tm_sec )); in rtc_set()
120 rtc_write( RTC_YEAR, bin2bcd( tmp->tm_year % 100 )); in rtc_set()
121 rtc_write( RTC_CENTURY, bin2bcd( tmp->tm_year / 100 )); in rtc_set()
A Dm41t11.c128 data[RTC_SEC_ADDR] = bin2bcd(tmp->tm_sec) & 0x7F;/*just in case*/ in rtc_set()
129 data[RTC_MIN_ADDR] = bin2bcd(tmp->tm_min); in rtc_set()
130 data[RTC_HOUR_ADDR] = bin2bcd(tmp->tm_hour) & 0x3F;/*handle cent stuff later*/ in rtc_set()
131 data[RTC_DATE_ADDR] = bin2bcd(tmp->tm_mday) & 0x3F; in rtc_set()
132 data[RTC_MONTH_ADDR] = bin2bcd(tmp->tm_mon); in rtc_set()
133 data[RTC_DAY_ADDR] = bin2bcd(tmp->tm_wday) & 0x07; in rtc_set()
137 data[RTC_YEARS_ADDR] = bin2bcd(tmp->tm_year%100);/*same thing either way*/ in rtc_set()
A Dds164x.c114 rtc_write( RTC_MONTH, bin2bcd( tmp->tm_mon )); in rtc_set()
116 rtc_write( RTC_DAY_OF_WEEK, bin2bcd( tmp->tm_wday )); in rtc_set()
117 rtc_write( RTC_DAY_OF_MONTH, bin2bcd( tmp->tm_mday )); in rtc_set()
118 rtc_write( RTC_HOURS, bin2bcd( tmp->tm_hour )); in rtc_set()
119 rtc_write( RTC_MINUTES, bin2bcd( tmp->tm_min )); in rtc_set()
120 rtc_write( RTC_SECONDS, bin2bcd( tmp->tm_sec )); in rtc_set()
123 rtc_write( RTC_YEAR, bin2bcd( tmp->tm_year % 100 )); in rtc_set()
A Disl1208.c140 buf[RTC_YR_REG_ADDR] = bin2bcd(tmp->tm_year % 100); in isl1208_rtc_set()
141 buf[RTC_MON_REG_ADDR] = bin2bcd(tmp->tm_mon); in isl1208_rtc_set()
142 buf[RTC_DAY_REG_ADDR] = bin2bcd(tmp->tm_wday); in isl1208_rtc_set()
143 buf[RTC_DATE_REG_ADDR] = bin2bcd(tmp->tm_mday); in isl1208_rtc_set()
144 buf[RTC_HR_REG_ADDR] = bin2bcd(tmp->tm_hour) | 0x80; /* 24h clock */ in isl1208_rtc_set()
145 buf[RTC_MIN_REG_ADDR] = bin2bcd(tmp->tm_min); in isl1208_rtc_set()
146 buf[RTC_SEC_REG_ADDR] = bin2bcd(tmp->tm_sec); in isl1208_rtc_set()
A Dmvrtc.c79 time |= (bin2bcd(t->tm_sec) & MVRTC_SEC_MSK) << MVRTC_SEC_SFT; in __mv_rtc_set()
80 time |= (bin2bcd(t->tm_min) & MVRTC_MIN_MSK) << MVRTC_MIN_SFT; in __mv_rtc_set()
81 time |= (bin2bcd(t->tm_hour) & MVRTC_HOUR_MSK) << MVRTC_HOUR_SFT; in __mv_rtc_set()
82 time |= (bin2bcd(t->tm_wday + 1) & MVRTC_DAY_MSK) << MVRTC_DAY_SFT; in __mv_rtc_set()
85 date |= (bin2bcd(t->tm_mday) & MVRTC_DATE_MSK) << MVRTC_DATE_SFT; in __mv_rtc_set()
86 date |= (bin2bcd(t->tm_mon) & MVRTC_MON_MSK) << MVRTC_MON_SFT; in __mv_rtc_set()
87 date |= (bin2bcd(t->tm_year % 100) & MVRTC_YEAR_MSK) << MVRTC_YEAR_SFT; in __mv_rtc_set()
A Dpcf2127.c58 buf[i++] = bin2bcd(tm->tm_sec); in pcf2127_rtc_set()
59 buf[i++] = bin2bcd(tm->tm_min); in pcf2127_rtc_set()
60 buf[i++] = bin2bcd(tm->tm_hour); in pcf2127_rtc_set()
61 buf[i++] = bin2bcd(tm->tm_mday); in pcf2127_rtc_set()
65 buf[i++] = bin2bcd(tm->tm_mon); in pcf2127_rtc_set()
68 buf[i++] = bin2bcd(tm->tm_year % 100); in pcf2127_rtc_set()
A Dm41t60.c183 data[RTC_SEC] = (data[RTC_SEC] & 0x80) | (bin2bcd(tmp->tm_sec) & 0x7F); in rtc_set()
184 data[RTC_MIN] = (data[RTC_MIN] & 0X80) | (bin2bcd(tmp->tm_min) & 0X7F); in rtc_set()
185 data[RTC_HOUR] = bin2bcd(tmp->tm_hour) & 0x3F; in rtc_set()
186 data[RTC_DATE] = bin2bcd(tmp->tm_mday) & 0x3F; in rtc_set()
187 data[RTC_MONTH] = bin2bcd(tmp->tm_mon) & 0x1F; in rtc_set()
188 data[RTC_YEAR] = bin2bcd(tmp->tm_year % 100); in rtc_set()
190 data[RTC_DAY] = bin2bcd(tmp->tm_wday + 1) & 0x07; in rtc_set()
A Dmk48t59.c141 rtc_write (RTC_YEAR, bin2bcd(tmp->tm_year % 100)); in rtc_set()
142 rtc_write (RTC_MONTH, bin2bcd(tmp->tm_mon)); in rtc_set()
144 rtc_write (RTC_DAY_OF_WEEK, bin2bcd(tmp->tm_wday)); in rtc_set()
145 rtc_write (RTC_DAY_OF_MONTH, bin2bcd(tmp->tm_mday)); in rtc_set()
146 rtc_write (RTC_HOURS, bin2bcd(tmp->tm_hour)); in rtc_set()
147 rtc_write (RTC_MINUTES, bin2bcd(tmp->tm_min )); in rtc_set()
148 rtc_write (RTC_SECONDS, bin2bcd(tmp->tm_sec )); in rtc_set()
A Ds3c24x0_rtc.c117 year = bin2bcd(tmp->tm_year % 100); in rtc_set()
118 mon = bin2bcd(tmp->tm_mon); in rtc_set()
119 wday = bin2bcd(tmp->tm_wday); in rtc_set()
120 mday = bin2bcd(tmp->tm_mday); in rtc_set()
121 hour = bin2bcd(tmp->tm_hour); in rtc_set()
122 min = bin2bcd(tmp->tm_min); in rtc_set()
123 sec = bin2bcd(tmp->tm_sec); in rtc_set()
A Drv8803.c51 buf[RTC_YR_REG_ADDR] = bin2bcd(tm->tm_year % 100); in rv8803_rtc_set()
52 buf[RTC_MON_REG_ADDR] = bin2bcd(tm->tm_mon); in rv8803_rtc_set()
54 buf[RTC_DATE_REG_ADDR] = bin2bcd(tm->tm_mday); in rv8803_rtc_set()
55 buf[RTC_HR_REG_ADDR] = bin2bcd(tm->tm_hour); in rv8803_rtc_set()
56 buf[RTC_MIN_REG_ADDR] = bin2bcd(tm->tm_min); in rv8803_rtc_set()
57 buf[RTC_SEC_REG_ADDR] = bin2bcd(tm->tm_sec); in rv8803_rtc_set()
A Dds3232.c151 buf[RTC_SEC_REG_ADDR] = bin2bcd(tm->tm_sec); in ds3232_rtc_set()
152 buf[RTC_MIN_REG_ADDR] = bin2bcd(tm->tm_min); in ds3232_rtc_set()
153 buf[RTC_HR_REG_ADDR] = bin2bcd(tm->tm_hour); in ds3232_rtc_set()
154 buf[RTC_DAY_REG_ADDR] = bin2bcd(tm->tm_wday + 1); in ds3232_rtc_set()
155 buf[RTC_DATE_REG_ADDR] = bin2bcd(tm->tm_mday); in ds3232_rtc_set()
156 buf[RTC_MON_REG_ADDR] = bin2bcd(tm->tm_mon) | is_century; in ds3232_rtc_set()
157 buf[RTC_YR_REG_ADDR] = bin2bcd(tm->tm_year % 100); in ds3232_rtc_set()
A Dmc146818.c144 mc146818_write8(RTC_YEAR, bin2bcd(tmp->tm_year % 100)); in mc146818_set()
145 mc146818_write8(RTC_MONTH, bin2bcd(tmp->tm_mon)); in mc146818_set()
147 mc146818_write8(RTC_DAY_OF_WEEK, bin2bcd(tmp->tm_wday + 1)); in mc146818_set()
148 mc146818_write8(RTC_DATE_OF_MONTH, bin2bcd(tmp->tm_mday)); in mc146818_set()
149 mc146818_write8(RTC_HOURS, bin2bcd(tmp->tm_hour)); in mc146818_set()
150 mc146818_write8(RTC_MINUTES, bin2bcd(tmp->tm_min)); in mc146818_set()
151 mc146818_write8(RTC_SECONDS, bin2bcd(tmp->tm_sec)); in mc146818_set()

Completed in 21 milliseconds

12