Commit f0b1ca62 authored by Sugaya Taichi's avatar Sugaya Taichi Committed by Daniel Lezcano

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: b58f28f3 ("clocksource/drivers/timer-milbeaut: Introduce timer for Milbeaut SoCs")
Signed-off-by: default avatarSugaya Taichi <sugaya.taichi@socionext.com>
Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
parent 95170f07
...@@ -79,6 +79,8 @@ static int mlb_set_state_oneshot(struct clock_event_device *clk) ...@@ -79,6 +79,8 @@ static int mlb_set_state_oneshot(struct clock_event_device *clk)
struct timer_of *to = to_timer_of(clk); struct timer_of *to = to_timer_of(clk);
u32 val = MLB_TMR_TMCSR_CSL_DIV2; 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); writel_relaxed(val, timer_of_base(to) + MLB_TMR_EVT_TMCSR_OFS);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment