aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/kernel/time.c')
-rw-r--r--arch/sh/kernel/time.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index 2edde32c764b..9b352a1e3fb4 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -91,21 +91,6 @@ module_init(rtc_generic_init);
91 91
92void (*board_time_init)(void); 92void (*board_time_init)(void);
93 93
94unsigned long long sched_clock(void)
95{
96 return (jiffies_64 - INITIAL_JIFFIES) * (NSEC_PER_SEC / HZ);
97}
98
99static void __init sh_late_time_init(void)
100{
101 /*
102 * Make sure all compiled-in early timers register themselves.
103 * Run probe() for one "earlytimer" device.
104 */
105 early_platform_driver_register_all("earlytimer");
106 early_platform_driver_probe("earlytimer", 1, 0);
107}
108
109void __init time_init(void) 94void __init time_init(void)
110{ 95{
111 if (board_time_init) 96 if (board_time_init)
@@ -121,5 +106,15 @@ void __init time_init(void)
121 local_timer_setup(smp_processor_id()); 106 local_timer_setup(smp_processor_id());
122#endif 107#endif
123 108
124 late_time_init = sh_late_time_init; 109 /*
110 * Make sure all compiled-in early timers register themselves.
111 *
112 * Run probe() for two "earlytimer" devices, these will be the
113 * clockevents and clocksource devices respectively. In the event
114 * that only a clockevents device is available, we -ENODEV on the
115 * clocksource and the jiffies clocksource is used transparently
116 * instead. No error handling is necessary here.
117 */
118 early_platform_driver_register_all("earlytimer");
119 early_platform_driver_probe("earlytimer", 2, 0);
125} 120}