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 --------------------------------
67 The driver is standard rtc. Simple conversion is possible.
70 drivers/rtc/s3c24x0_rtc.c
71 -------------------------
72 The driver is standard rtc. Simple conversion is possible.
75 drivers/rtc/pt7c4338.c
76 ----------------------
77 The driver is standard rtc. Simple conversion is possible.
82 The driver is standard rtc. Simple conversion is possible.
85 drivers/rtc/ftrtc010.c
86 ----------------------
87 The driver is standard rtc. Simple conversion is possible.
92 The driver is standard rtc. Simple conversion is possible.
97 The driver is standard rtc. Simple conversion is possible.
100 drivers/rtc/rs5c372.c
101 ---------------------
102 The driver is standard rtc. Simple conversion is possible.
107 The driver is standard rtc. Simple conversion is possible.
110 drivers/rtc/mc13xxx-rtc.c
111 -------------------------
112 The driver is standard rtc. Simple conversion is possible.
117 The driver is standard rtc. Simple conversion is possible.
120 drivers/rtc/davinci.c
121 ---------------------
122 The driver is standard rtc. Simple conversion is possible.
127 The driver is standard rtc. Simple conversion is possible.
130 drivers/rtc/bfin_rtc.c
131 ----------------------
132 The driver is standard rtc. Simple conversion is possible.
137 The driver is standard rtc. Simple conversion is possible.
142 The driver is standard rtc. Simple conversion is possible.
147 The driver is standard rtc. Simple conversion is possible.
152 The driver is standard rtc. Simple conversion is possible.
155 drivers/rtc/ds12887.c
156 ---------------------
157 The driver is standard rtc. Simple conversion is possible.
162 The driver is standard rtc. Simple conversion is possible.
167 The driver is standard rtc. Simple conversion is possible.
172 The driver is standard rtc. Simple conversion is possible.
177 The driver is standard rtc. Simple conversion is possible.
180 drivers/rtc/m48t35ax.c
181 ----------------------
182 The driver is standard rtc. Simple conversion is possible.
187 The driver is standard rtc. Simple conversion is possible.
192 The driver is standard rtc. Simple conversion is possible.
197 The driver is standard rtc. Simple conversion is possible.
200 drivers/rtc/pcf8563.c
201 ---------------------
202 The driver is standard rtc. Simple conversion is possible.
205 drivers/rtc/mk48t59.c
206 ---------------------
207 Macros needs cleanup. Besides that the driver is standard rtc.
208 Simple conversion is possible.
213 The driver is standard rtc. Simple conversion is possible.
218 The driver is standard rtc. Simple conversion is possible.
223 The driver is standard rtc. Simple conversion is possible.
226 drivers/rtc/rtc4543.c
227 ---------------------
228 The driver is standard rtc. Simple conversion is possible.
233 The driver is standard rtc. Simple conversion is possible.
236 drivers/rtc/isl1208.c
237 ---------------------
238 The driver is standard rtc. Simple conversion is possible.
241 drivers/rtc/max6900.c
242 ---------------------
243 The driver is standard rtc. Simple conversion is possible.
246 drivers/rtc/mc146818.c
247 ----------------------
248 The driver is standard rtc. Simple conversion is possible.
251 drivers/rtc/at91sam9_rtt.c
252 --------------------------
253 The driver is standard rtc. Simple conversion is possible.