summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSugaya Taichi <sugaya.taichi@socionext.com>2019-04-12 16:36:49 +0900
committerDaniel Lezcano <daniel.lezcano@linaro.org>2019-05-02 21:55:58 +0200
commitf0b1ca623d8df5dad977f22a1142a81a886b0eb8 (patch)
tree70f63bc425aed575868b2c08f1f0509ceadc60a9
parent95170f0708f2f499da2594b29d39ac07ea221d7a (diff)
downloadlinux-f0b1ca623d8df5dad977f22a1142a81a886b0eb8.tar.gz
linux-f0b1ca623d8df5dad977f22a1142a81a886b0eb8.tar.bz2
linux-f0b1ca623d8df5dad977f22a1142a81a886b0eb8.zip
clocksource/drivers/timer-milbeaut: Fix to enable one-shot timer
Fix mlb_set_oneshot_state() to enable one-shot timer. The function should stop and start a timer, but "start" statement was dropped. Kick the register to start one-shot timer. Fixes: b58f28f306db ("clocksource/drivers/timer-milbeaut: Introduce timer for Milbeaut SoCs") Signed-off-by: Sugaya Taichi <sugaya.taichi@socionext.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r--drivers/clocksource/timer-milbeaut.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/clocksource/timer-milbeaut.c b/drivers/clocksource/timer-milbeaut.c
index f2019a88e3ee..9fd5d081fac4 100644
--- a/drivers/clocksource/timer-milbeaut.c
+++ b/drivers/clocksource/timer-milbeaut.c
@@ -80,6 +80,8 @@ static int mlb_set_state_oneshot(struct clock_event_device *clk)
u32 val = MLB_TMR_TMCSR_CSL_DIV2;
writel_relaxed(val, timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS);
+ val |= MLB_TMR_TMCSR_CNTE | MLB_TMR_TMCSR_TRG | MLB_TMR_TMCSR_INTE;
+ writel_relaxed(val, timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS);
return 0;
}