diff options
-rw-r--r-- | arch/ppc/platforms/83xx/mpc834x_sys.c | 20 |
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) | ||
189 | extern ulong ds1374_get_rtc_time(void); | ||
190 | extern int ds1374_set_rtc_time(ulong); | ||
191 | |||
192 | static int __init | ||
193 | mpc834x_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 | } | ||
206 | late_initcall(mpc834x_rtc_hookup); | ||
207 | #endif | ||
188 | static __inline__ void | 208 | static __inline__ void |
189 | mpc834x_sys_set_bat(void) | 209 | mpc834x_sys_set_bat(void) |
190 | { | 210 | { |