aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/ppc/platforms/83xx/mpc834x_sys.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/arch/ppc/platforms/83xx/mpc834x_sys.c b/arch/ppc/platforms/83xx/mpc834x_sys.c
index 86ca5cf81263..37ece1542799 100644
--- a/arch/ppc/platforms/83xx/mpc834x_sys.c
+++ b/arch/ppc/platforms/83xx/mpc834x_sys.c
@@ -185,6 +185,26 @@ mpc834x_sys_init_IRQ(void)
185 ipic_set_default_priority(); 185 ipic_set_default_priority();
186} 186}
187 187
188#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
189extern ulong ds1374_get_rtc_time(void);
190extern int ds1374_set_rtc_time(ulong);
191
192static int __init
193mpc834x_rtc_hookup(void)
194{
195 struct timespec tv;
196
197 ppc_md.get_rtc_time = ds1374_get_rtc_time;
198 ppc_md.set_rtc_time = ds1374_set_rtc_time;
199
200 tv.tv_nsec = 0;
201 tv.tv_sec = (ppc_md.get_rtc_time)();
202 do_settimeofday(&tv);
203
204 return 0;
205}
206late_initcall(mpc834x_rtc_hookup);
207#endif
188static __inline__ void 208static __inline__ void
189mpc834x_sys_set_bat(void) 209mpc834x_sys_set_bat(void)
190{ 210{