summaryrefslogtreecommitdiff
path: root/drivers/clocksource/sun4i_timer.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2013-12-10 20:47:22 +0100
committerIngo Molnar <mingo@kernel.org>2013-12-10 20:47:22 +0100
commit5d5119a476f77b57381ddd66d4f7034a5447480b (patch)
treef6bc77f6bcc06ee5582d6cf586e3dca5167063f3 /drivers/clocksource/sun4i_timer.c
parent17b2112f332db7c2bac56926c9e627807bce3615 (diff)
parent9ab4727c1d41e50b67aecde4bf11879560a3ca78 (diff)
Merge branch 'clockevents/fixes' of git://git.linaro.org/people/daniel.lezcano/linux into timers/urgent
Pull clockevents/clocksource fixes from Daniel Lezcano: * Axel Lin added a missing dependency on CLKSRC_MMIO in the Kconfig for the time-efm32 * Dinh Nguyen fixed read_sched_clock to return the right value and added the clksrc-of missing definition for the dw_apb_timer * Ezequiel Garcia registered the sched clock after the counter, thus preventing time jump in the traces for the armada-370-xp * Marc Zyngier stopped the timer before enabling the irq in order to prevent it to be fired before the clockevent is registered for the sunxi * Thierry Reding removed a of_node_put in clksrc-of because the reference is not held Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'drivers/clocksource/sun4i_timer.c')
-rw-r--r--drivers/clocksource/sun4i_timer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/clocksource/sun4i_timer.c b/drivers/clocksource/sun4i_timer.c
index 2fb4695a28d8..a4f6119aafd8 100644
--- a/drivers/clocksource/sun4i_timer.c
+++ b/drivers/clocksource/sun4i_timer.c
@@ -179,6 +179,9 @@ static void __init sun4i_timer_init(struct device_node *node)
writel(TIMER_CTL_CLK_SRC(TIMER_CTL_CLK_SRC_OSC24M),
timer_base + TIMER_CTL_REG(0));
+ /* Make sure timer is stopped before playing with interrupts */
+ sun4i_clkevt_time_stop(0);
+
ret = setup_irq(irq, &sun4i_timer_irq);
if (ret)
pr_warn("failed to setup irq %d\n", irq);