]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support
authorTony Lindgren <tony@atomide.com>
Wed, 16 Jun 2021 12:31:10 +0000 (15:31 +0300)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 15 Jul 2021 17:27:48 +0000 (19:27 +0200)
commitc600614b22a47246ac0bea479a9e800b13141291
tree6b1ec91d2d74578eabcc302f6ff38d957c0cf913
parent9e14fb47a09ae7d05ace2cc889b6a6b691393012
clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support

BugLink: https://bugs.launchpad.net/bugs/1934179
commit 52762fbd1c4778ac9b173624ca0faacd22ef4724 upstream.

We can move the TI dmtimer clockevent and clocksource to live under
drivers/clocksource if we rely only on the clock framework, and handle
the module configuration directly in the clocksource driver based on the
device tree data.

This removes the early dependency with system timers to the interconnect
related code, and we can probe pretty much everything else later on at
the module_init level.

Let's first add a new driver for timer-ti-dm-systimer based on existing
arch/arm/mach-omap2/timer.c. Then let's start moving SoCs to probe with
device tree data while still keeping the old timer.c. And eventually we
can just drop the old timer.c.

Let's take the opportunity to switch to use readl/writel as pointed out
by Daniel Lezcano <daniel.lezcano@linaro.org>. This allows further
clean-up of the timer-ti-dm code the a lot of the shared helpers can
just become static to the non-syster related code.

Note the boards can optionally configure different timer source clocks
if needed with assigned-clocks and assigned-clock-parents.

Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Keerthy <j-keerthy@ti.com>
Cc: Tero Kristo <kristo@kernel.org>
[tony@atomide.com: backported to 5.4.y]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/arm/mach-omap2/timer.c