arm_arch_timer driver emulates ONESHOT mode over PERIODIC mode and so even if the clockevent device isn't used for some CPU, we will continue getting spurious interrupts from the clockevent device.
Clockevents core supports a CLOCK_EVT_MODE_ONESHOT_STOPPED now which will be called when the clockevent device running in ONESHOT mode is required to be stopped.
Lets add support to handle that in this driver. This was tested on 'Samsung-Exynos' (dual A15) board.
Signed-off-by: Viresh Kumar viresh.kumar@linaro.org --- drivers/clocksource/arm_arch_timer.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index 44f1eaa..3589bbc 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -186,6 +186,7 @@ static __always_inline int timer_set_mode(const int access, int mode, switch (mode) { case CLOCK_EVT_MODE_UNUSED: case CLOCK_EVT_MODE_SHUTDOWN: + case CLOCK_EVT_MODE_ONESHOT_STOPPED: ctrl = arch_timer_reg_read(access, ARCH_TIMER_REG_CTRL, clk); ctrl &= ~ARCH_TIMER_CTRL_ENABLE; arch_timer_reg_write(access, ARCH_TIMER_REG_CTRL, ctrl, clk);