From 98c3db91adb94375f5c1188b05d09f565b106272 Mon Sep 17 00:00:00 2001 From: Randy Vinson Date: Fri, 3 Jun 2005 14:43:56 -0700 Subject: [PATCH] --- yaml --- r: 2737 b: refs/heads/master c: bdca3f0aedde85552099aa95ab1449bf81e4f6f5 h: refs/heads/master i: 2735: 67cea601ba17f26c6372278be4f072c6841b8736 v: v3 --- [refs] | 2 +- trunk/arch/ppc/platforms/83xx/mpc834x_sys.c | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2600843931ab..d66f5ba5fc93 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c124a78d8c7475ecc43f385f34112b638c4228d9 +refs/heads/master: bdca3f0aedde85552099aa95ab1449bf81e4f6f5 diff --git a/trunk/arch/ppc/platforms/83xx/mpc834x_sys.c b/trunk/arch/ppc/platforms/83xx/mpc834x_sys.c index 86ca5cf81263..37ece1542799 100644 --- a/trunk/arch/ppc/platforms/83xx/mpc834x_sys.c +++ b/trunk/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) {