1 =============================
2 RTC device subsystem analysis
3 =============================
5 Tomas Hlavacek <tmshlvck@gmail.com>
11 U-Boot currently implements one common API for RTC devices. The interface
12 is defined in include/rtc.h and comprises of functions and structures:
26 int rtc_get (struct rtc_time *);
27 int rtc_set (struct rtc_time *);
28 void rtc_reset (void);
30 The functions are implemented by a proper device driver in drivers/rtc
31 directory and the driver to be compiled in is selected in a Makefile.
32 Drivers are mutually exclusive.
34 Drivers depends on date code in drivers/rtc/date.c and naturally on board
42 In the UDM each rtc driver would register itself by a function
44 int rtc_device_register(struct instance *i,
45 struct rtc_device_ops *o);
47 The structure being defined as follows:
49 struct rtc_device_ops {
50 int (*get_time)(struct instance *i, struct rtc_time *t);
51 int (*set_time)(struct instance *i, struct rtc_time *t);
52 int (*reset)(struct instance *i);
56 2) Conversion thougths
57 ----------------------
58 U-Boot RTC drivers exports the same functions and therefore the conversion
59 of the drivers is straight-forward. There is no initialization needed.
62 III) Analysis of in-tree drivers
63 --------------------------------
65 1) drivers/rtc/rv3029.c
66 -----------------------
67 The driver is standard rtc. Simple conversion is possible.
70 2) drivers/rtc/s3c24x0_rtc.c
71 ----------------------------
72 The driver is standard rtc. Simple conversion is possible.
75 3) drivers/rtc/pt7c4338.c
76 -------------------------
77 The driver is standard rtc. Simple conversion is possible.
80 4) drivers/rtc/mvrtc.c
81 ----------------------
82 The driver is standard rtc. Simple conversion is possible.
85 5) drivers/rtc/ftrtc010.c
86 -------------------------
87 The driver is standard rtc. Simple conversion is possible.
90 6) drivers/rtc/mpc5xxx.c
91 ------------------------
92 The driver is standard rtc. Simple conversion is possible.
95 7) drivers/rtc/ds164x.c
96 -----------------------
97 The driver is standard rtc. Simple conversion is possible.
100 8) drivers/rtc/rs5c372.c
101 ------------------------
102 The driver is standard rtc. Simple conversion is possible.
105 9) drivers/rtc/m41t94.c
106 -----------------------
107 The driver is standard rtc. Simple conversion is possible.
110 10) drivers/rtc/mc13xxx-rtc.c
111 -----------------------------
112 The driver is standard rtc. Simple conversion is possible.
115 11) drivers/rtc/mcfrtc.c
116 ------------------------
117 The driver is standard rtc. Simple conversion is possible.
120 12) drivers/rtc/davinci.c
121 -------------------------
122 The driver is standard rtc. Simple conversion is possible.
125 13) drivers/rtc/rx8025.c
126 ------------------------
127 The driver is standard rtc. Simple conversion is possible.
130 14) drivers/rtc/bfin_rtc.c
131 --------------------------
132 The driver is standard rtc. Simple conversion is possible.
135 15) drivers/rtc/m41t62.c
136 ------------------------
137 The driver is standard rtc. Simple conversion is possible.
140 16) drivers/rtc/ds1306.c
141 ------------------------
142 The driver is standard rtc. Simple conversion is possible.
145 17) drivers/rtc/mpc8xx.c
146 ------------------------
147 The driver is standard rtc. Simple conversion is possible.
150 18) drivers/rtc/ds3231.c
151 ------------------------
152 The driver is standard rtc. Simple conversion is possible.
155 19) drivers/rtc/ds12887.c
156 -------------------------
157 The driver is standard rtc. Simple conversion is possible.
160 20) drivers/rtc/ds1302.c
161 ------------------------
162 The driver is standard rtc. Simple conversion is possible.
165 21) drivers/rtc/ds1374.c
166 ------------------------
167 The driver is standard rtc. Simple conversion is possible.
170 22) drivers/rtc/ds174x.c
171 ------------------------
172 The driver is standard rtc. Simple conversion is possible.
175 23) drivers/rtc/m41t60.c
176 ------------------------
177 The driver is standard rtc. Simple conversion is possible.
180 24) drivers/rtc/m48t35ax.c
181 --------------------------
182 The driver is standard rtc. Simple conversion is possible.
185 25) drivers/rtc/pl031.c
186 -----------------------
187 The driver is standard rtc. Simple conversion is possible.
190 26) drivers/rtc/x1205.c
191 -----------------------
192 The driver is standard rtc. Simple conversion is possible.
195 27) drivers/rtc/m41t11.c
196 ------------------------
197 The driver is standard rtc. Simple conversion is possible.
200 28) drivers/rtc/pcf8563.c
201 -------------------------
202 The driver is standard rtc. Simple conversion is possible.
205 29) drivers/rtc/mk48t59.c
206 -------------------------
207 Macros needs cleanup. Besides that the driver is standard rtc.
208 Simple conversion is possible.
211 30) drivers/rtc/mxsrtc.c
212 ------------------------
213 The driver is standard rtc. Simple conversion is possible.
216 31) drivers/rtc/ds1307.c
217 ------------------------
218 The driver is standard rtc. Simple conversion is possible.
221 32) drivers/rtc/ds1556.c
222 ------------------------
223 The driver is standard rtc. Simple conversion is possible.
226 33) drivers/rtc/rtc4543.c
227 -------------------------
228 The driver is standard rtc. Simple conversion is possible.
231 34) drivers/rtc/s3c44b0_rtc.c
232 -----------------------------
233 The driver is standard rtc. Simple conversion is possible.
236 35) drivers/rtc/ds1337.c
237 ------------------------
238 The driver is standard rtc. Simple conversion is possible.
241 36) drivers/rtc/isl1208.c
242 -------------------------
243 The driver is standard rtc. Simple conversion is possible.
246 37) drivers/rtc/max6900.c
247 -------------------------
248 The driver is standard rtc. Simple conversion is possible.
251 38) drivers/rtc/mc146818.c
252 --------------------------
253 The driver is standard rtc. Simple conversion is possible.
256 39) drivers/rtc/at91sam9_rtt.c
257 ------------------------------
258 The driver is standard rtc. Simple conversion is possible.