clocksource: davinci: only enable clockevents once tim34 is initialized
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Fri, 10 Jan 2020 17:16:41 +0000 (18:16 +0100)
committerSekhar Nori <nsekhar@ti.com>
Mon, 13 Jan 2020 07:50:00 +0000 (13:20 +0530)
commitcea931c25104e6bddc42eb067f58193f355dbdd7
tree13c058839243191937dc5b922cfbad0fee4b258a
parente42617b825f8073569da76dc4510bfa019b1c35a
clocksource: davinci: only enable clockevents once tim34 is initialized

The DM365 platform has a strange quirk (only present when using ancient
u-boot - mainline u-boot v2013.01 and later works fine) where if we
enable the second half of the timer in periodic mode before we do its
initialization - the time won't start flowing and we can't boot.

When using more recent u-boot, we can enable the timer, then reinitialize
it and all works fine.

To work around this issue only enable clockevents once tim34 is
initialized i.e. move clockevents_config_and_register() below tim34
initialization.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
drivers/clocksource/timer-davinci.c