]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support
authorTony Lindgren <tony@atomide.com>
Thu, 7 May 2020 17:23:18 +0000 (10:23 -0700)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 22 May 2020 22:01:04 +0000 (00:01 +0200)
commit52762fbd1c4778ac9b173624ca0faacd22ef4724
treecd40b4a9f849cc1e0e0ddfcfd02be539d7bd9129
parent46b30515f97ece3da661b251e4a0ad9ac7a338d3
clocksource/drivers/timer-ti-dm: Add clockevent and clocksource support

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: linux-kernel@vger.kernel.org
Cc: linux-omap@vger.kernel.org
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Keerthy <j-keerthy@ti.com>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Cc: Rob Herring <robh@kernel.org>
Cc: Tero Kristo <t-kristo@ti.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20200507172330.18679-3-tony@atomide.com
drivers/clocksource/Makefile
drivers/clocksource/timer-ti-dm-systimer.c [new file with mode: 0644]