|
@@ -185,6 +185,26 @@ mpc834x_sys_init_IRQ(void)
|
|
|
ipic_set_default_priority();
|
|
|
}
|
|
|
|
|
|
+#if defined(CONFIG_I2C_MPC) && defined(CONFIG_SENSORS_DS1374)
|
|
|
+extern ulong ds1374_get_rtc_time(void);
|
|
|
+extern int ds1374_set_rtc_time(ulong);
|
|
|
+
|
|
|
+static int __init
|
|
|
+mpc834x_rtc_hookup(void)
|
|
|
+{
|
|
|
+ struct timespec tv;
|
|
|
+
|
|
|
+ ppc_md.get_rtc_time = ds1374_get_rtc_time;
|
|
|
+ ppc_md.set_rtc_time = ds1374_set_rtc_time;
|
|
|
+
|
|
|
+ tv.tv_nsec = 0;
|
|
|
+ tv.tv_sec = (ppc_md.get_rtc_time)();
|
|
|
+ do_settimeofday(&tv);
|
|
|
+
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+late_initcall(mpc834x_rtc_hookup);
|
|
|
+#endif
|
|
|
static __inline__ void
|
|
|
mpc834x_sys_set_bat(void)
|
|
|
{
|