Home
last modified time | relevance | path

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

/external/u-boot/drivers/rtc/
Dpcf8563.c21 static void rtc_write (uchar reg, uchar val);
78 rtc_write (0x08, bin2bcd(tmp->tm_year % 100)); in rtc_set()
81 rtc_write (0x07, bin2bcd(tmp->tm_mon) | century); in rtc_set()
83 rtc_write (0x06, bin2bcd(tmp->tm_wday)); in rtc_set()
84 rtc_write (0x05, bin2bcd(tmp->tm_mday)); in rtc_set()
85 rtc_write (0x04, bin2bcd(tmp->tm_hour)); in rtc_set()
86 rtc_write (0x03, bin2bcd(tmp->tm_min )); in rtc_set()
87 rtc_write (0x02, bin2bcd(tmp->tm_sec )); in rtc_set()
95 rtc_write (0x00, 0x00); in rtc_reset()
96 rtc_write (0x01, 0x00); in rtc_reset()
[all …]
Dm48t35ax.c22 static void rtc_write (uchar reg, uchar val);
34 rtc_write(0, ccr); in rtc_get()
47 rtc_write(0, ccr); in rtc_get()
83 rtc_write(0, ccr); in rtc_set()
85 rtc_write (0x07, bin2bcd(tmp->tm_year % 100)); in rtc_set()
86 rtc_write (0x06, bin2bcd(tmp->tm_mon)); in rtc_set()
87 rtc_write (0x05, bin2bcd(tmp->tm_mday)); in rtc_set()
90 rtc_write (0x04, bin2bcd(tmp->tm_wday) | century); in rtc_set()
92 rtc_write (0x03, bin2bcd(tmp->tm_hour)); in rtc_set()
93 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.c22 static void rtc_write( unsigned int addr, uchar val);
60 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()
111 rtc_write( RTC_CONTROLA, ( reg_a | RTC_CA_WRITE )); in rtc_set()
113 rtc_write( RTC_MONTH, bin2bcd( tmp->tm_mon )); in rtc_set()
115 rtc_write( RTC_DAY_OF_WEEK, bin2bcd( tmp->tm_wday )); in rtc_set()
116 rtc_write( RTC_DAY_OF_MONTH, bin2bcd( tmp->tm_mday )); in rtc_set()
117 rtc_write( RTC_HOURS, bin2bcd( tmp->tm_hour )); in rtc_set()
118 rtc_write( RTC_MINUTES, bin2bcd( tmp->tm_min )); in rtc_set()
119 rtc_write( RTC_SECONDS, bin2bcd( tmp->tm_sec )); in rtc_set()
[all …]
Dds164x.c26 static void rtc_write(unsigned int addr, uchar val);
63 rtc_write( RTC_CONTROLA, ( reg_a | RTC_CA_READ )); in rtc_get()
74 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 …]
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()
87 rtc_write(RTC_CONTROLA, save_ctrl_a); in rtc_get()
99 rtc_write(RTC_CONTROLA, save_ctrl_a); in rtc_get()
141 rtc_write(RTC_CONTROLA, save_ctrl_a); /* disables the RTC to update the regs */ in rtc_set()
143 rtc_write (RTC_YEAR, bin2bcd(tmp->tm_year % 100)); in rtc_set()
144 rtc_write (RTC_MONTH, bin2bcd(tmp->tm_mon)); in rtc_set()
146 rtc_write (RTC_DAY_OF_WEEK, bin2bcd(tmp->tm_wday)); in rtc_set()
147 rtc_write (RTC_DAY_OF_MONTH, bin2bcd(tmp->tm_mday)); in rtc_set()
[all …]
Dds1337.c66 static void rtc_write (uchar reg, uchar val);
98 rtc_write (RTC_STAT_REG_ADDR, in rtc_get()
132 rtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100)); in rtc_set()
135 rtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon) | century); in rtc_set()
137 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
138 rtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday)); in rtc_set()
139 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
140 rtc_write (RTC_MIN_REG_ADDR, bin2bcd (tmp->tm_min)); in rtc_set()
141 rtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec)); in rtc_set()
165 rtc_write (RTC_CTL_REG_ADDR, RTC_DS1337_RESET_VAL); in rtc_reset()
[all …]
Dmax6900.c31 static void rtc_write (uchar reg, uchar val) in rtc_write() function
90 rtc_write (0x9E, 0x00); in rtc_set()
91 rtc_write (0x80, 0); /* Clear seconds to ensure no rollover */ in rtc_set()
92 rtc_write (0x92, bin2bcd(tmp->tm_year / 100)); in rtc_set()
93 rtc_write (0x8c, bin2bcd(tmp->tm_year % 100)); in rtc_set()
94 rtc_write (0x8a, bin2bcd(tmp->tm_wday)); in rtc_set()
95 rtc_write (0x88, bin2bcd(tmp->tm_mon)); in rtc_set()
96 rtc_write (0x86, bin2bcd(tmp->tm_mday)); in rtc_set()
97 rtc_write (0x84, bin2bcd(tmp->tm_hour)); in rtc_set()
98 rtc_write (0x82, bin2bcd(tmp->tm_min )); in rtc_set()
[all …]
Dds3231.c56 static void rtc_write (uchar reg, uchar val);
84 rtc_write (RTC_STAT_REG_ADDR, in rtc_get()
118 rtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100)); in rtc_set()
121 rtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon) | century); in rtc_set()
123 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
124 rtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday)); in rtc_set()
125 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
126 rtc_write (RTC_MIN_REG_ADDR, bin2bcd (tmp->tm_min)); in rtc_set()
127 rtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec)); in rtc_set()
142 rtc_write (RTC_CTL_REG_ADDR, RTC_CTL_BIT_RS1 | RTC_CTL_BIT_RS2); in rtc_reset()
[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.c280 static void rtc_write (unsigned char reg, unsigned char val);
372 rtc_write (RTC_SECONDS, bin2bcd (tmp->tm_sec)); in rtc_set()
373 rtc_write (RTC_MINUTES, bin2bcd (tmp->tm_min)); in rtc_set()
374 rtc_write (RTC_HOURS, bin2bcd (tmp->tm_hour)); in rtc_set()
375 rtc_write (RTC_DAY_OF_WEEK, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
376 rtc_write (RTC_DATE_OF_MONTH, bin2bcd (tmp->tm_mday)); in rtc_set()
377 rtc_write (RTC_MONTH, bin2bcd (tmp->tm_mon)); in rtc_set()
378 rtc_write (RTC_YEAR, bin2bcd (tmp->tm_year - 2000)); in rtc_set()
400 rtc_write (RTC_CONTROL, 0x00); /* 1st step: reset WP */ in rtc_reset()
401 rtc_write (RTC_CONTROL, 0x00); /* 2nd step: reset 1Hz, AIE1, AIE0 */ in rtc_reset()
[all …]
Drx8025.c75 static void rtc_write (uchar reg, uchar val);
151 rtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100)); in rtc_set()
152 rtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon)); in rtc_set()
153 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday)); in rtc_set()
154 rtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday)); in rtc_set()
155 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
156 rtc_write (RTC_MIN_REG_ADDR, bin2bcd (tmp->tm_min)); in rtc_set()
157 rtc_write (RTC_SEC_REG_ADDR, bin2bcd (tmp->tm_sec)); in rtc_set()
159 rtc_write (RTC_CTL1_REG_ADDR, RTC_CTL1_BIT_2412); in rtc_set()
178 rtc_write (RTC_CTL2_REG_ADDR, ctl2); in rtc_reset()
[all …]
Dds1307.c75 static void rtc_write (uchar reg, uchar val);
104 rtc_write (RTC_SEC_REG_ADDR, in rtc_get()
113 rtc_write(RTC_DAY_REG_ADDR, in rtc_get()
119 rtc_write(RTC_SEC_REG_ADDR, MCP7941X_BIT_ST); in rtc_get()
156 rtc_write (RTC_YR_REG_ADDR, bin2bcd (tmp->tm_year % 100)); in rtc_set()
157 rtc_write (RTC_MON_REG_ADDR, bin2bcd (tmp->tm_mon)); in rtc_set()
159 rtc_write (RTC_DAY_REG_ADDR, in rtc_set()
162 rtc_write (RTC_DAY_REG_ADDR, bin2bcd (tmp->tm_wday + 1)); in rtc_set()
164 rtc_write (RTC_DATE_REG_ADDR, bin2bcd (tmp->tm_mday)); in rtc_set()
165 rtc_write (RTC_HR_REG_ADDR, bin2bcd (tmp->tm_hour)); in rtc_set()
[all …]
Dds1374.c78 static void rtc_write(uchar reg, uchar val, bool set);
160 rtc_write(RTC_CTL_ADDR, RTC_CTL_BIT_EN_OSC, false); in rtc_set()
175 rtc_write(RTC_SR_ADDR, (RTC_SR_BIT_AF|RTC_SR_BIT_OSF), false); /* clearing OSF and AF */ in rtc_reset()
178 rtc_write (RTC_CTL_ADDR, (RTC_CTL_BIT_EN_OSC in rtc_reset()
182 rtc_write (RTC_CTL_ADDR, (RTC_CTL_BIT_WD_ALM in rtc_reset()
189 rtc_write(RTC_WD_ALM_CNT_BYTE2_ADDR, 0xAC, true); in rtc_reset()
190 rtc_write(RTC_WD_ALM_CNT_BYTE1_ADDR, 0xDE, true); in rtc_reset()
191 rtc_write(RTC_WD_ALM_CNT_BYTE2_ADDR, 0xAD, true); in rtc_reset()
202 static void rtc_write(uchar reg, uchar val, bool set) in rtc_write() function
Dx1205.c79 static void rtc_write(int reg, u8 val) in rtc_write() function
145 rtc_write(X1205_REG_SR, X1205_SR_WEL); in rtc_set()
146 rtc_write(X1205_REG_SR, X1205_SR_WEL | X1205_SR_RWEL); in rtc_set()
150 rtc_write(X1205_CCR_BASE + i, buf[i]); in rtc_set()
152 rtc_write(X1205_REG_SR, 0); in rtc_set()