]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource/drivers/msc313e: Add support for ssd20xd-based platforms
authorRomain Perier <romain.perier@gmail.com>
Fri, 17 Dec 2021 19:57:23 +0000 (20:57 +0100)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Mon, 20 Dec 2021 12:28:39 +0000 (13:28 +0100)
commit43789ce91e3cea89d7493790820889a1fb4d4b52
tree300eda8345517bc140b286939b93839c86924db8
parent24829b8364f7b18bcdca366c6d267df5ef994b84
clocksource/drivers/msc313e: Add support for ssd20xd-based platforms

On SSD20X family SoCs the timers are connected to a 432MHz clock instead
of 12MHz that all the previous chips used. There is no way to reduce or
divide these clocks in the clktree yet as we do not know exactly where
the 432MHz clock comes from but it is enabled at boot.

The SSD20X timers have an input clock divider within the timer itself
to configure the frequency. timer0 is preconfigured at power up to run
at 12MHz so it is backwards compatible and doesn't need special handling
right now. timer1 and timer2 run at 432Mhz at power up so are not
backward compatible.

This commit adds support for the input clock divider register and sets
timer1 and timer2 to run at 48Mhz for clockevents.

Signed-off-by: Romain Perier <romain.perier@gmail.com>
Link: https://lore.kernel.org/r/20211217195727.8955-3-romain.perier@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
drivers/clocksource/timer-msc313e.c