mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] clocksource/drivers/timer-ti-dm: add module build support
@ 2025-02-20 14:31 Guillaume La Roque
  2025-03-05  9:43 ` Daniel Lezcano
  0 siblings, 1 reply; 2+ messages in thread
From: Guillaume La Roque @ 2025-02-20 14:31 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner
  Cc: Nishanth Menon, Andrew Davis, mkorpershoek, linux-kernel,
	Guillaume La Roque

Add missing MODULE_LICENSE variable and convert bool to tristate in
Kconfig to be able to build driver in module.

By default this driver was set at y when ARCH_K3=y.

Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
---
Enable possibility to build in module timer-ti-dm driver needed in
Android context and Android Generic Kernel Image support.

I know any other clicksource driver support module build but i do test on AM62X and
AM62P EVM board and i able to use this driver and test it with PWM.

By default this driver will be always enable in bultin when ARCH_K3=y so
no impact for other TI SoC.
---
 drivers/clocksource/Kconfig       | 4 ++--
 drivers/clocksource/timer-ti-dm.c | 1 +
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
index 487c85259967..6ba4b2c48a76 100644
--- a/drivers/clocksource/Kconfig
+++ b/drivers/clocksource/Kconfig
@@ -57,8 +57,8 @@ config DIGICOLOR_TIMER
 	  Enables the support for the digicolor timer driver.
 
 config OMAP_DM_TIMER
-	bool "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST
-	default y if ARCH_K3
+	tristate "OMAP dual-mode timer driver" if ARCH_K3 || COMPILE_TEST
+	default ARCH_K3
 	select TIMER_OF
 	help
 	  Enables the support for the TI dual-mode timer driver.
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index e9e32df6b566..c6183e1fdb5c 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -1307,3 +1307,4 @@ module_platform_driver(omap_dm_timer_driver);
 
 MODULE_DESCRIPTION("OMAP Dual-Mode Timer Driver");
 MODULE_AUTHOR("Texas Instruments Inc");
+MODULE_LICENSE("GPL");

---
base-commit: 87a132e73910e8689902aed7f2fc229d6908383b
change-id: 20250220-timer-dm-9e71a9b5abd7

Best regards,
-- 
Guillaume La Roque <glaroque@baylibre.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] clocksource/drivers/timer-ti-dm: add module build support
  2025-02-20 14:31 [PATCH] clocksource/drivers/timer-ti-dm: add module build support Guillaume La Roque
@ 2025-03-05  9:43 ` Daniel Lezcano
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Lezcano @ 2025-03-05  9:43 UTC (permalink / raw)
  To: Guillaume La Roque, Thomas Gleixner
  Cc: Nishanth Menon, Andrew Davis, mkorpershoek, linux-kernel,
	Linux PM mailing list

On 20/02/2025 15:31, Guillaume La Roque wrote:
> Add missing MODULE_LICENSE variable and convert bool to tristate in
> Kconfig to be able to build driver in module.
> 
> By default this driver was set at y when ARCH_K3=y.
> 
> Signed-off-by: Guillaume La Roque <glaroque@baylibre.com>
> ---
> Enable possibility to build in module timer-ti-dm driver needed in
> Android context and Android Generic Kernel Image support.
> 
> I know any other clicksource driver support module build but i do test on AM62X and
> AM62P EVM board and i able to use this driver and test it with PWM.
> 
> By default this driver will be always enable in bultin when ARCH_K3=y so
> no impact for other TI SoC.
> ---

Thomas, Guillaume

there are several requests to convert the built-in timers code into 
modules since Android is converted to a GKI.

I have some concerns about this kind of changes:

  * the core code may not be prepared for that, so loading / unloading 
the modules with active timers may result into some issues

  * it may end up with some interactions with cpuidle at boot time and 
the broadcast timer

  * the timekeeping may do jump in the past [if and] when switching the 
clocksource

  * the GKI approach is to have an update for the 'mainline' kernel and 
let the different SoC vendors deal with their drivers. I'm afraid this 
will prevent driver fixes to be carry on upstream because they will stay 
in the OoT kernels

For all these reasons, I don't think we can take the module change as is 
without figuring out the three first technical reasons (the last one is 
from an upstream maintainer POV)

Thoughts?

Thanks

   -- Daniel




-- 
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-03-05  9:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-20 14:31 [PATCH] clocksource/drivers/timer-ti-dm: add module build support Guillaume La Roque
2025-03-05  9:43 ` Daniel Lezcano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®