summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-22 10:42:54 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-22 10:42:54 -0700
commit4e93d3e8859c834ee18dfd33051d24df8669d0c0 (patch)
tree13f5b39730857257b5040471618e9bcce30ed9cc /arch
parenta0cd30fd26a398c0c6e50c6760610d4529f17a84 (diff)
parent0087e5ef577d0d6e664be7ab4be513b6a482e7ec (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
Diffstat (limited to 'arch')
-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)
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)
{