diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2009-09-20 05:55:36 -0700 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2009-09-20 05:55:36 -0700 |
commit | 6469f540ea37d53db089c8fea9c0c77a3d9353d4 (patch) | |
tree | 1dc9dc077150d57f4424cae49e711b5dd6e903a1 /arch/sh/kernel/time.c | |
parent | 304e6d5fe294b80e6d3107f99ec241816390ebcc (diff) | |
parent | 78f28b7c555359c67c2a0d23f7436e915329421e (diff) | |
download | talos-op-linux-6469f540ea37d53db089c8fea9c0c77a3d9353d4.tar.gz talos-op-linux-6469f540ea37d53db089c8fea9c0c77a3d9353d4.zip |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/mtd/mtdcore.c
Merged in order that I can apply the Nomadik nand/onenand support patches.
Diffstat (limited to 'arch/sh/kernel/time.c')
-rw-r--r-- | arch/sh/kernel/time.c | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c index 9b352a1e3fb4..953fa1613312 100644 --- a/arch/sh/kernel/time.c +++ b/arch/sh/kernel/time.c @@ -21,6 +21,7 @@ #include <linux/smp.h> #include <linux/rtc.h> #include <asm/clock.h> +#include <asm/hwblk.h> #include <asm/rtc.h> /* Dummy RTC ops */ @@ -39,11 +40,9 @@ void (*rtc_sh_get_time)(struct timespec *) = null_rtc_get_time; int (*rtc_sh_set_time)(const time_t) = null_rtc_set_time; #ifdef CONFIG_GENERIC_CMOS_UPDATE -unsigned long read_persistent_clock(void) +void read_persistent_clock(struct timespec *ts) { - struct timespec tv; - rtc_sh_get_time(&tv); - return tv.tv_sec; + rtc_sh_get_time(ts); } int update_persistent_clock(struct timespec now) @@ -91,21 +90,8 @@ module_init(rtc_generic_init); void (*board_time_init)(void); -void __init time_init(void) +static void __init sh_late_time_init(void) { - if (board_time_init) - board_time_init(); - - clk_init(); - - rtc_sh_get_time(&xtime); - set_normalized_timespec(&wall_to_monotonic, - -xtime.tv_sec, -xtime.tv_nsec); - -#ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST - local_timer_setup(smp_processor_id()); -#endif - /* * Make sure all compiled-in early timers register themselves. * @@ -118,3 +104,18 @@ void __init time_init(void) early_platform_driver_register_all("earlytimer"); early_platform_driver_probe("earlytimer", 2, 0); } + +void __init time_init(void) +{ + if (board_time_init) + board_time_init(); + + hwblk_init(); + clk_init(); + + rtc_sh_get_time(&xtime); + set_normalized_timespec(&wall_to_monotonic, + -xtime.tv_sec, -xtime.tv_nsec); + + late_time_init = sh_late_time_init; +} |