clocksource: exynos_mct: Clear timer interrupt when shutdown 87/199787/2
authorStuart Menefy <stuart.menefy@mathembedded.com>
Sun, 10 Feb 2019 22:51:14 +0000 (22:51 +0000)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Mon, 18 Feb 2019 04:55:29 +0000 (04:55 +0000)
When shutting down the timer, ensure that after we have stopped the
timer any pending interrupts are cleared. This fixes a problem when
suspending, as interrupts are disabled before the timer is stopped,
so the timer interrupt may still be asserted, preventing the system
entering a low power state when the wfi is executed.

Signed-off-by: Stuart Menefy <stuart.menefy@mathembedded.com>
[pending patch for mainline]
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Change-Id: I2068bbadeb5e778bb81f772693e30a47e64dd77c

drivers/clocksource/exynos_mct.c

index 1e325f8..d55c30f 100644 (file)
@@ -411,6 +411,7 @@ static int set_state_shutdown(struct clock_event_device *evt)
 
        mevt = container_of(evt, struct mct_clock_event_device, evt);
        exynos4_mct_tick_stop(mevt);
+       exynos4_mct_tick_clear(mevt);
        return 0;
 }