diff options
Diffstat (limited to 'arch/arm/mach-lpc32xx/timer.c')
-rw-r--r-- | arch/arm/mach-lpc32xx/timer.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/arch/arm/mach-lpc32xx/timer.c b/arch/arm/mach-lpc32xx/timer.c index c40667c33161..20eab63d10ba 100644 --- a/arch/arm/mach-lpc32xx/timer.c +++ b/arch/arm/mach-lpc32xx/timer.c | |||
@@ -70,7 +70,6 @@ static void lpc32xx_clkevt_mode(enum clock_event_mode mode, | |||
70 | static struct clock_event_device lpc32xx_clkevt = { | 70 | static struct clock_event_device lpc32xx_clkevt = { |
71 | .name = "lpc32xx_clkevt", | 71 | .name = "lpc32xx_clkevt", |
72 | .features = CLOCK_EVT_FEAT_ONESHOT, | 72 | .features = CLOCK_EVT_FEAT_ONESHOT, |
73 | .shift = 32, | ||
74 | .rating = 300, | 73 | .rating = 300, |
75 | .set_next_event = lpc32xx_clkevt_next_event, | 74 | .set_next_event = lpc32xx_clkevt_next_event, |
76 | .set_mode = lpc32xx_clkevt_mode, | 75 | .set_mode = lpc32xx_clkevt_mode, |
@@ -100,7 +99,7 @@ static struct irqaction lpc32xx_timer_irq = { | |||
100 | * clocks need to be enabled here manually and then tagged as used in | 99 | * clocks need to be enabled here manually and then tagged as used in |
101 | * the clock driver initialization | 100 | * the clock driver initialization |
102 | */ | 101 | */ |
103 | static void __init lpc32xx_timer_init(void) | 102 | void __init lpc32xx_timer_init(void) |
104 | { | 103 | { |
105 | u32 clkrate, pllreg; | 104 | u32 clkrate, pllreg; |
106 | 105 | ||
@@ -141,14 +140,8 @@ static void __init lpc32xx_timer_init(void) | |||
141 | setup_irq(IRQ_LPC32XX_TIMER0, &lpc32xx_timer_irq); | 140 | setup_irq(IRQ_LPC32XX_TIMER0, &lpc32xx_timer_irq); |
142 | 141 | ||
143 | /* Setup the clockevent structure. */ | 142 | /* Setup the clockevent structure. */ |
144 | lpc32xx_clkevt.mult = div_sc(clkrate, NSEC_PER_SEC, | ||
145 | lpc32xx_clkevt.shift); | ||
146 | lpc32xx_clkevt.max_delta_ns = clockevent_delta2ns(-1, | ||
147 | &lpc32xx_clkevt); | ||
148 | lpc32xx_clkevt.min_delta_ns = clockevent_delta2ns(1, | ||
149 | &lpc32xx_clkevt) + 1; | ||
150 | lpc32xx_clkevt.cpumask = cpumask_of(0); | 143 | lpc32xx_clkevt.cpumask = cpumask_of(0); |
151 | clockevents_register_device(&lpc32xx_clkevt); | 144 | clockevents_config_and_register(&lpc32xx_clkevt, clkrate, 1, -1); |
152 | 145 | ||
153 | /* Use timer1 as clock source. */ | 146 | /* Use timer1 as clock source. */ |
154 | __raw_writel(LPC32XX_TIMER_CNTR_TCR_RESET, | 147 | __raw_writel(LPC32XX_TIMER_CNTR_TCR_RESET, |
@@ -161,8 +154,3 @@ static void __init lpc32xx_timer_init(void) | |||
161 | clocksource_mmio_init(LPC32XX_TIMER_TC(LPC32XX_TIMER1_BASE), | 154 | clocksource_mmio_init(LPC32XX_TIMER_TC(LPC32XX_TIMER1_BASE), |
162 | "lpc32xx_clksrc", clkrate, 300, 32, clocksource_mmio_readl_up); | 155 | "lpc32xx_clksrc", clkrate, 300, 32, clocksource_mmio_readl_up); |
163 | } | 156 | } |
164 | |||
165 | struct sys_timer lpc32xx_timer = { | ||
166 | .init = &lpc32xx_timer_init, | ||
167 | }; | ||
168 | |||