clocksource/drivers/stm32: Start the timer's counter sooner
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 8 Jan 2018 13:28:59 +0000 (14:28 +0100)
committerIngo Molnar <mingo@kernel.org>
Mon, 8 Jan 2018 16:57:26 +0000 (17:57 +0100)
commit103bb56a2831bfc7f2d442da9e47f89f37d34952
treeb21bd1930ac097fac087ad3a035d002c5e3f43c7
parent81abdbbffd69fecdac37fe1d2b44a21227ee23d4
clocksource/drivers/stm32: Start the timer's counter sooner

As we have a lot of timers on this platform, we can have potentially all the
timers enabled in the DT, so we don't want to start the timer for every probe
otherwise they will be running for nothing as only one will be used.

Start the timer only when setting the mode or when the clocksource is
enabled.

Tested-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1515418139-23276-20-git-send-email-daniel.lezcano@linaro.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
drivers/clocksource/timer-stm32.c