aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-w90x900/time.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-w90x900/time.c')
-rw-r--r--arch/arm/mach-w90x900/time.c20
1 files changed, 2 insertions, 18 deletions
diff --git a/arch/arm/mach-w90x900/time.c b/arch/arm/mach-w90x900/time.c
index b80f769bc135..a2c4e2d0a0d4 100644
--- a/arch/arm/mach-w90x900/time.c
+++ b/arch/arm/mach-w90x900/time.c
@@ -43,7 +43,6 @@
43#define PRESCALE 0x63 /* Divider = prescale + 1 */ 43#define PRESCALE 0x63 /* Divider = prescale + 1 */
44 44
45#define TDR_SHIFT 24 45#define TDR_SHIFT 24
46#define TDR_MASK ((1 << TDR_SHIFT) - 1)
47 46
48static unsigned int timer0_load; 47static unsigned int timer0_load;
49 48
@@ -143,20 +142,6 @@ static void __init nuc900_clockevents_init(void)
143 clockevents_register_device(&nuc900_clockevent_device); 142 clockevents_register_device(&nuc900_clockevent_device);
144} 143}
145 144
146static cycle_t nuc900_get_cycles(struct clocksource *cs)
147{
148 return (~__raw_readl(REG_TDR1)) & TDR_MASK;
149}
150
151static struct clocksource clocksource_nuc900 = {
152 .name = "nuc900-timer1",
153 .rating = 200,
154 .read = nuc900_get_cycles,
155 .mask = CLOCKSOURCE_MASK(TDR_SHIFT),
156 .shift = 10,
157 .flags = CLOCK_SOURCE_IS_CONTINUOUS,
158};
159
160static void __init nuc900_clocksource_init(void) 145static void __init nuc900_clocksource_init(void)
161{ 146{
162 unsigned int val; 147 unsigned int val;
@@ -176,9 +161,8 @@ static void __init nuc900_clocksource_init(void)
176 val |= (COUNTEN | PERIOD | PRESCALE); 161 val |= (COUNTEN | PERIOD | PRESCALE);
177 __raw_writel(val, REG_TCSR1); 162 __raw_writel(val, REG_TCSR1);
178 163
179 clocksource_nuc900.mult = 164 clocksource_mmio_init(REG_TDR1, "nuc900-timer1", rate, 200,
180 clocksource_khz2mult((rate / 1000), clocksource_nuc900.shift); 165 TDR_SHIFT, clocksource_mmio_readl_down);
181 clocksource_register(&clocksource_nuc900);
182} 166}
183 167
184static void __init nuc900_timer_init(void) 168static void __init nuc900_timer_init(void)