aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/time.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-05-12 06:53:55 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-05-12 06:53:55 -0400
commit8be5f1a68f2c14082939dd54e7037dcee2eb54f8 (patch)
treebb1560495357c6554dc7a471255e0e257e9dcf13 /arch/sh/kernel/time.c
parentf19900b2e608b604777a74d6d711bbf744657756 (diff)
sh: Kill off the remnants of the old timer code.
Now with all of the TMU users moved over to the new TMU driver, and the old TMU driver killed off, the left-over infrastructure can go along with it. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/time.c')
-rw-r--r--arch/sh/kernel/time.c29
1 files changed, 2 insertions, 27 deletions
diff --git a/arch/sh/kernel/time.c b/arch/sh/kernel/time.c
index a77838f539f..2edde32c764 100644
--- a/arch/sh/kernel/time.c
+++ b/arch/sh/kernel/time.c
@@ -22,9 +22,6 @@
22#include <linux/rtc.h> 22#include <linux/rtc.h>
23#include <asm/clock.h> 23#include <asm/clock.h>
24#include <asm/rtc.h> 24#include <asm/rtc.h>
25#include <asm/timer.h>
26
27struct sys_timer *sys_timer;
28 25
29/* Dummy RTC ops */ 26/* Dummy RTC ops */
30static void null_rtc_get_time(struct timespec *tv) 27static void null_rtc_get_time(struct timespec *tv)
@@ -94,20 +91,9 @@ module_init(rtc_generic_init);
94 91
95void (*board_time_init)(void); 92void (*board_time_init)(void);
96 93
97struct clocksource clocksource_sh = {
98 .name = "SuperH",
99};
100
101unsigned long long sched_clock(void) 94unsigned long long sched_clock(void)
102{ 95{
103 unsigned long long cycles; 96 return (jiffies_64 - INITIAL_JIFFIES) * (NSEC_PER_SEC / HZ);
104
105 /* jiffies based sched_clock if no clocksource is installed */
106 if (!clocksource_sh.rating)
107 return (jiffies_64 - INITIAL_JIFFIES) * (NSEC_PER_SEC / HZ);
108
109 cycles = clocksource_sh.read(&clocksource_sh);
110 return cyc2ns(&clocksource_sh, cycles);
111} 97}
112 98
113static void __init sh_late_time_init(void) 99static void __init sh_late_time_init(void)
@@ -117,18 +103,7 @@ static void __init sh_late_time_init(void)
117 * Run probe() for one "earlytimer" device. 103 * Run probe() for one "earlytimer" device.
118 */ 104 */
119 early_platform_driver_register_all("earlytimer"); 105 early_platform_driver_register_all("earlytimer");
120 if (early_platform_driver_probe("earlytimer", 1, 0)) 106 early_platform_driver_probe("earlytimer", 1, 0);
121 return;
122
123 /*
124 * Find the timer to use as the system timer, it will be
125 * initialized for us.
126 */
127 sys_timer = get_sys_timer();
128 if (unlikely(!sys_timer))
129 panic("System timer missing.\n");
130
131 printk(KERN_INFO "Using %s for system timer\n", sys_timer->name);
132} 107}
133 108
134void __init time_init(void) 109void __init time_init(void)