Skip to content

Commit aba1ad0

Browse files
tmlinddlezcano
authored andcommitted
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 <[email protected]>. 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: [email protected] Cc: [email protected] Cc: Daniel Lezcano <[email protected]> Cc: Grygorii Strashko <[email protected]> Cc: Keerthy <[email protected]> Cc: Lokesh Vutla <[email protected]> Cc: Rob Herring <[email protected]> Cc: Tero Kristo <[email protected]> Cc: Thomas Gleixner <[email protected]> Signed-off-by: Tony Lindgren <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent d15483b commit aba1ad0

File tree

2 files changed

+732
-0
lines changed

2 files changed

+732
-0
lines changed

drivers/clocksource/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ obj-$(CONFIG_CLKSRC_MMIO) += mmio.o
1818
obj-$(CONFIG_DAVINCI_TIMER) += timer-davinci.o
1919
obj-$(CONFIG_DIGICOLOR_TIMER) += timer-digicolor.o
2020
obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm.o
21+
obj-$(CONFIG_OMAP_DM_TIMER) += timer-ti-dm-systimer.o
2122
obj-$(CONFIG_DW_APB_TIMER) += dw_apb_timer.o
2223
obj-$(CONFIG_DW_APB_TIMER_OF) += dw_apb_timer_of.o
2324
obj-$(CONFIG_FTTMR010_TIMER) += timer-fttmr010.o

0 commit comments

Comments
 (0)