diff options
Diffstat (limited to 'drivers/clocksource/sun4i_timer.c')
-rw-r--r-- | drivers/clocksource/sun4i_timer.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c index efb17c3ee120..f4a9c0058b4d 100644 --- a/drivers/clocksource/sun4i_timer.c +++ b/drivers/clocksource/sun4i_timer.c | |||
@@ -182,6 +182,12 @@ static void __init sun4i_timer_init(struct device_node *node) | |||
182 | /* Make sure timer is stopped before playing with interrupts */ | 182 | /* Make sure timer is stopped before playing with interrupts */ |
183 | sun4i_clkevt_time_stop(0); | 183 | sun4i_clkevt_time_stop(0); |
184 | 184 | ||
185 | sun4i_clockevent.cpumask = cpu_possible_mask; | ||
186 | sun4i_clockevent.irq = irq; | ||
187 | |||
188 | clockevents_config_and_register(&sun4i_clockevent, rate, | ||
189 | TIMER_SYNC_TICKS, 0xffffffff); | ||
190 | |||
185 | ret = setup_irq(irq, &sun4i_timer_irq); | 191 | ret = setup_irq(irq, &sun4i_timer_irq); |
186 | if (ret) | 192 | if (ret) |
187 | pr_warn("failed to setup irq %d\n", irq); | 193 | pr_warn("failed to setup irq %d\n", irq); |
@@ -189,12 +195,6 @@ static void __init sun4i_timer_init(struct device_node *node) | |||
189 | /* Enable timer0 interrupt */ | 195 | /* Enable timer0 interrupt */ |
190 | val = readl(timer_base + TIMER_IRQ_EN_REG); | 196 | val = readl(timer_base + TIMER_IRQ_EN_REG); |
191 | writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG); | 197 | writel(val | TIMER_IRQ_EN(0), timer_base + TIMER_IRQ_EN_REG); |
192 | |||
193 | sun4i_clockevent.cpumask = cpu_possible_mask; | ||
194 | sun4i_clockevent.irq = irq; | ||
195 | |||
196 | clockevents_config_and_register(&sun4i_clockevent, rate, | ||
197 | TIMER_SYNC_TICKS, 0xffffffff); | ||
198 | } | 198 | } |
199 | CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer", | 199 | CLOCKSOURCE_OF_DECLARE(sun4i, "allwinner,sun4i-a10-timer", |
200 | sun4i_timer_init); | 200 | sun4i_timer_init); |