Home
last modified time | relevance | path

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

/external/u-boot/drivers/rtc/
Dpcf8563.c19 static void rtc_write (uchar reg, uchar val);
76 rtc_write (0x08, bin2bcd(tmp->tm_year % 100)); in rtc_set()
79 rtc_write (0x07, bin2bcd(tmp->tm_mon) | century); in rtc_set()
81 rtc_write (0x06, bin2bcd(tmp->tm_wday)); in rtc_set()
82 rtc_write (0x05, bin2bcd(tmp->tm_mday)); in rtc_set()
83 rtc_write (0x04, bin2bcd(tmp->tm_hour)); in rtc_set()
84 rtc_write (0x03, bin2bcd(tmp->tm_min )); in rtc_set()
85 rtc_write (0x02, bin2bcd(tmp->tm_sec )); in rtc_set()
93 rtc_write (0x00, 0x00); in rtc_reset()
94 rtc_write (0x01, 0x00); in rtc_reset()
[all …]
Dm48t35ax.c20 static void rtc_write (uchar reg, uchar val);
32 rtc_write(0, ccr); in rtc_get()
45 rtc_write(0, ccr); in rtc_get()
81 rtc_write(0, ccr); in rtc_set()
83 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()
[all …]
Dds1556.c25 static void rtc_write( unsigned int addr, uchar val);
63 rtc_write( RTC_CONTROLA, ( reg_a | RTC_CA_READ )); in rtc_get()
75 rtc_write( RTC_CONTROLA, ( reg_a & ~RTC_CA_READ )); in rtc_get()
114 rtc_write( RTC_CONTROLA, ( reg_a | RTC_CA_WRITE )); in rtc_set()
116 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()
[all …]
Dds174x.c20 static void rtc_write( unsigned int addr, uchar val);
58 rtc_write( RTC_CONTROLA, ( reg_a | RTC_CA_READ )); in rtc_get()
70 rtc_write( RTC_CONTROLA, ( reg_a & ~RTC_CA_READ )); in rtc_get()
109 rtc_write( RTC_CONTROLA, ( reg_a | RTC_CA_WRITE )); in rtc_set()
111 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()
[all …]
Dds164x.c24 static void rtc_write(unsigned int addr, uchar val);
61 rtc_write( RTC_CONTROLA, ( reg_a | RTC_CA_READ )); in rtc_get()
72 rtc_write( RTC_CONTROLA, ( reg_a & ~RTC_CA_READ )); in rtc_get()
112 rtc_write( RTC_CONTROLA, ( reg_a | RTC_CA_WRITE )); in rtc_set()
114 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()
[all …]
Dmk48t59.c28 static void rtc_write (short reg, uchar val) in rtc_write() function
42 static void rtc_write (short reg, uchar val) in rtc_write() function
70 rtc_write(d++, *s++); in nvram_write()
85 rtc_write(RTC_CONTROLA, save_ctrl_a); in rtc_get()
97 rtc_write(RTC_CONTROLA, save_ctrl_a); in rtc_get()
139 rtc_write(RTC_CONTROLA, save_ctrl_a); /* disables the RTC to update the regs */ in rtc_set()
141 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()
[all …]
Dds1337.c64 static void rtc_write (uchar reg, uchar val);
96 rtc_write (RTC_STAT_REG_ADDR, in rtc_get()
130 rtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100)); in rtc_set()
133 rtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon) | century); in rtc_set()
135 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
136 rtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday)); in rtc_set()
137 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
138 rtc_write (RTC_MIN_REG_ADDR, bin2bcd (tmp->tm_min)); in rtc_set()
139 rtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec)); in rtc_set()
163 rtc_write (RTC_CTL_REG_ADDR, RTC_DS1337_RESET_VAL); in rtc_reset()
[all …]
Dmax6900.c29 static void rtc_write (uchar reg, uchar val) in rtc_write() function
88 rtc_write (0x9E, 0x00); in rtc_set()
89 rtc_write (0x80, 0); /* Clear seconds to ensure no rollover */ in rtc_set()
90 rtc_write (0x92, bin2bcd(tmp->tm_year / 100)); in rtc_set()
91 rtc_write (0x8c, bin2bcd(tmp->tm_year % 100)); in rtc_set()
92 rtc_write (0x8a, bin2bcd(tmp->tm_wday)); in rtc_set()
93 rtc_write (0x88, bin2bcd(tmp->tm_mon)); in rtc_set()
94 rtc_write (0x86, bin2bcd(tmp->tm_mday)); in rtc_set()
95 rtc_write (0x84, bin2bcd(tmp->tm_hour)); in rtc_set()
96 rtc_write (0x82, bin2bcd(tmp->tm_min )); in rtc_set()
[all …]
Dpt7c4338.c55 static void rtc_write(u8 reg, u8 val) in rtc_write() function
82 rtc_write(RTC_CTL_STAT_REG_ADDR, in rtc_get()
111 rtc_write(RTC_YR_REG_ADDR, bin2bcd(tmp->tm_year % 100)); in rtc_set()
112 rtc_write(RTC_MON_REG_ADDR, bin2bcd(tmp->tm_mon)); in rtc_set()
113 rtc_write(RTC_DAY_REG_ADDR, bin2bcd(tmp->tm_wday + 1)); in rtc_set()
114 rtc_write(RTC_DATE_REG_ADDR, bin2bcd(tmp->tm_mday)); in rtc_set()
115 rtc_write(RTC_HR_REG_ADDR, bin2bcd(tmp->tm_hour)); in rtc_set()
116 rtc_write(RTC_MIN_REG_ADDR, bin2bcd(tmp->tm_min)); in rtc_set()
117 rtc_write(RTC_SEC_REG_ADDR, bin2bcd(tmp->tm_sec)); in rtc_set()
125 rtc_write(RTC_SEC_REG_ADDR, 0x00); /* clearing Clock Halt */ in rtc_reset()
[all …]
Dds1306.c278 static void rtc_write (unsigned char reg, unsigned char val);
370 rtc_write (RTC_SECONDS, bin2bcd (tmp->tm_sec)); in rtc_set()
371 rtc_write (RTC_MINUTES, bin2bcd (tmp->tm_min)); in rtc_set()
372 rtc_write (RTC_HOURS, bin2bcd (tmp->tm_hour)); in rtc_set()
373 rtc_write (RTC_DAY_OF_WEEK, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
374 rtc_write (RTC_DATE_OF_MONTH, bin2bcd (tmp->tm_mday)); in rtc_set()
375 rtc_write (RTC_MONTH, bin2bcd (tmp->tm_mon)); in rtc_set()
376 rtc_write (RTC_YEAR, bin2bcd (tmp->tm_year - 2000)); in rtc_set()
398 rtc_write (RTC_CONTROL, 0x00); /* 1st step: reset WP */ in rtc_reset()
399 rtc_write (RTC_CONTROL, 0x00); /* 2nd step: reset 1Hz, AIE1, AIE0 */ in rtc_reset()
[all …]
Dds1307.c74 static void rtc_write (uchar reg, uchar val);
103 rtc_write (RTC_SEC_REG_ADDR, in rtc_get()
112 rtc_write(RTC_DAY_REG_ADDR, in rtc_get()
118 rtc_write(RTC_SEC_REG_ADDR, MCP7941X_BIT_ST); in rtc_get()
155 rtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100)); in rtc_set()
156 rtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon)); in rtc_set()
158 rtc_write (RTC_DAY_REG_ADDR, in rtc_set()
161 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
163 rtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday)); in rtc_set()
164 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
[all …]
Dds1374.c76 static void rtc_write(uchar reg, uchar val, bool set);
158 rtc_write(RTC_CTL_ADDR, RTC_CTL_BIT_EN_OSC, false); in rtc_set()
173 rtc_write(RTC_SR_ADDR, (RTC_SR_BIT_AF|RTC_SR_BIT_OSF), false); /* clearing OSF and AF */ in rtc_reset()
176 rtc_write (RTC_CTL_ADDR, (RTC_CTL_BIT_EN_OSC in rtc_reset()
180 rtc_write (RTC_CTL_ADDR, (RTC_CTL_BIT_WD_ALM in rtc_reset()
187 rtc_write(RTC_WD_ALM_CNT_BYTE2_ADDR, 0xAC, true); in rtc_reset()
188 rtc_write(RTC_WD_ALM_CNT_BYTE1_ADDR, 0xDE, true); in rtc_reset()
189 rtc_write(RTC_WD_ALM_CNT_BYTE2_ADDR, 0xAD, true); in rtc_reset()
200 static void rtc_write(uchar reg, uchar val, bool set) in rtc_write() function
Drx8025.c94 static int rtc_write(DEV_TYPE *dev, uchar reg, uchar val);
177 if (rtc_write(dev, RTC_YR_REG_ADDR, bin2bcd(tmp->tm_year % 100)))
180 if (rtc_write(dev, RTC_MON_REG_ADDR, bin2bcd(tmp->tm_mon)))
183 if (rtc_write(dev, RTC_DAY_REG_ADDR, bin2bcd(tmp->tm_wday)))
186 if (rtc_write(dev, RTC_DATE_REG_ADDR, bin2bcd(tmp->tm_mday)))
189 if (rtc_write(dev, RTC_HR_REG_ADDR, bin2bcd(tmp->tm_hour)))
192 if (rtc_write(dev, RTC_MIN_REG_ADDR, bin2bcd(tmp->tm_min)))
195 if (rtc_write(dev, RTC_SEC_REG_ADDR, bin2bcd(tmp->tm_sec)))
198 return rtc_write(dev, RTC_CTL1_REG_ADDR, RTC_CTL1_BIT_2412);
222 return rtc_write(dev, RTC_CTL2_REG_ADDR, ctl2);
[all …]
Dds3231.c59 static void rtc_write (uchar reg, uchar val);
87 rtc_write (RTC_STAT_REG_ADDR, in rtc_get()
121 rtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100)); in rtc_set()
124 rtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon) | century); in rtc_set()
126 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
127 rtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday)); in rtc_set()
128 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
129 rtc_write (RTC_MIN_REG_ADDR, bin2bcd (tmp->tm_min)); in rtc_set()
130 rtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec)); in rtc_set()
145 rtc_write (RTC_CTL_REG_ADDR, RTC_CTL_BIT_RS1 | RTC_CTL_BIT_RS2); in rtc_reset()
[all …]
Dx1205.c77 static void rtc_write(int reg, u8 val) in rtc_write() function
143 rtc_write(X1205_REG_SR, X1205_SR_WEL); in rtc_set()
144 rtc_write(X1205_REG_SR, X1205_SR_WEL | X1205_SR_RWEL); in rtc_set()
148 rtc_write(X1205_CCR_BASE + i, buf[i]); in rtc_set()
150 rtc_write(X1205_REG_SR, 0); in rtc_set()