* [PATCH] clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654
@ 2026-08-28 18:47 Markus Schneider-Pargmann (TI)
2026-08-28 21:04 ` Andreas Kemnade
2026-09-16 8:59 ` Markus Schneider-Pargmann
0 siblings, 2 replies; 6+ messages in thread
From: Markus Schneider-Pargmann (TI) @ 2026-08-28 18:47 UTC (permalink / raw)
To: Daniel Lezcano, Thomas Gleixner
Cc: H. Nikolaus Schaller, Andreas Kemnade, linux-kernel,
Markus Schneider-Pargmann (TI)
Registering clocksource/clockevent for the older platforms breaks
booting them. The older platforms have their own implementation in early
boot that is used to register clocksource/clockevent in
timer-ti-dm-systimer.c.
With am654, the timer is much more complex with more dependencies so
doing this in early boot with the other driver is very difficult and
gets ugly. Instead it is implemented in the platform driver for am654.
However the old platforms may not register clocksource/clockevent in
this driver as that would break the boot.
Add a system_timer_capable flag that is only set for am654-timer that
gates the clocksource/clockevent registration.
Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
Closes: https://lore.kernel.org/r/2013A99A-0502-4128-ACFA-B04886224393@goldelico.com
Fixes: b8eeeca55456 ("clocksource/drivers/timer-ti-dm: Add clocksource support")
Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
---
drivers/clocksource/timer-ti-dm.c | 4 +++-
include/linux/platform_data/dmtimer-omap.h | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
index 6787acac9a43..ae8777d03215 100644
--- a/drivers/clocksource/timer-ti-dm.c
+++ b/drivers/clocksource/timer-ti-dm.c
@@ -1475,7 +1475,8 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
timer->pdev = pdev;
- if (timer->capability & OMAP_TIMER_ALWON && !IS_ERR_OR_NULL(timer->fclk)) {
+ if (pdata->system_timer_capable &&
+ timer->capability & OMAP_TIMER_ALWON && !IS_ERR_OR_NULL(timer->fclk)) {
if (!omap_dm_timer_sched_clock_counter) {
ret = omap_dm_timer_setup_clocksource(timer);
if (ret)
@@ -1585,6 +1586,7 @@ static const struct dmtimer_platform_data omap3plus_pdata = {
static const struct dmtimer_platform_data am6_pdata = {
.timer_ops = &dmtimer_ops,
+ .system_timer_capable = true,
};
static const struct of_device_id omap_timer_match[] = {
diff --git a/include/linux/platform_data/dmtimer-omap.h b/include/linux/platform_data/dmtimer-omap.h
index 726d89143842..b78ee4676b98 100644
--- a/include/linux/platform_data/dmtimer-omap.h
+++ b/include/linux/platform_data/dmtimer-omap.h
@@ -57,6 +57,8 @@ struct dmtimer_platform_data {
u32 timer_errata;
int (*get_context_loss_count)(struct device *);
const struct omap_dm_timer_ops *timer_ops;
+ /* always-on timers can be used for clocksource/clockevent */
+ bool system_timer_capable;
};
#endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */
---
base-commit: e30626823a406725ce29bc75cb8ec467d3e1e326
change-id: 20260828-v7-3-next-topic-ti-timer-dm-clocksource-omap-fix-418786f115bc
Best regards,
--
Markus Schneider-Pargmann (TI) <msp@baylibre.com>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654
2026-08-28 18:47 [PATCH] clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654 Markus Schneider-Pargmann (TI)
@ 2026-08-28 21:04 ` Andreas Kemnade
2026-08-29 7:23 ` H. Nikolaus Schaller
2026-09-16 8:59 ` Markus Schneider-Pargmann
1 sibling, 1 reply; 6+ messages in thread
From: Andreas Kemnade @ 2026-08-28 21:04 UTC (permalink / raw)
To: Markus Schneider-Pargmann (TI)
Cc: Daniel Lezcano, Thomas Gleixner, H. Nikolaus Schaller, linux-kernel
On Fri, 28 Aug 2026 20:47:45 +0200
"Markus Schneider-Pargmann (TI)" <msp@baylibre.com> wrote:
> Registering clocksource/clockevent for the older platforms breaks
> booting them. The older platforms have their own implementation in early
> boot that is used to register clocksource/clockevent in
> timer-ti-dm-systimer.c.
>
> With am654, the timer is much more complex with more dependencies so
> doing this in early boot with the other driver is very difficult and
> gets ugly. Instead it is implemented in the platform driver for am654.
> However the old platforms may not register clocksource/clockevent in
> this driver as that would break the boot.
>
> Add a system_timer_capable flag that is only set for am654-timer that
> gates the clocksource/clockevent registration.
>
> Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
> Closes: https://lore.kernel.org/r/2013A99A-0502-4128-ACFA-B04886224393@goldelico.com
> Fixes: b8eeeca55456 ("clocksource/drivers/timer-ti-dm: Add clocksource support")
> Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
Tested-by: Andreas Kemnade <andreas@kemnade.info> # OMAP3 GTA04
> ---
> drivers/clocksource/timer-ti-dm.c | 4 +++-
> include/linux/platform_data/dmtimer-omap.h | 2 ++
> 2 files changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c
> index 6787acac9a43..ae8777d03215 100644
> --- a/drivers/clocksource/timer-ti-dm.c
> +++ b/drivers/clocksource/timer-ti-dm.c
> @@ -1475,7 +1475,8 @@ static int omap_dm_timer_probe(struct platform_device *pdev)
>
> timer->pdev = pdev;
>
> - if (timer->capability & OMAP_TIMER_ALWON && !IS_ERR_OR_NULL(timer->fclk)) {
> + if (pdata->system_timer_capable &&
> + timer->capability & OMAP_TIMER_ALWON && !IS_ERR_OR_NULL(timer->fclk)) {
> if (!omap_dm_timer_sched_clock_counter) {
> ret = omap_dm_timer_setup_clocksource(timer);
> if (ret)
> @@ -1585,6 +1586,7 @@ static const struct dmtimer_platform_data omap3plus_pdata = {
>
> static const struct dmtimer_platform_data am6_pdata = {
> .timer_ops = &dmtimer_ops,
> + .system_timer_capable = true,
> };
>
> static const struct of_device_id omap_timer_match[] = {
> diff --git a/include/linux/platform_data/dmtimer-omap.h b/include/linux/platform_data/dmtimer-omap.h
> index 726d89143842..b78ee4676b98 100644
> --- a/include/linux/platform_data/dmtimer-omap.h
> +++ b/include/linux/platform_data/dmtimer-omap.h
> @@ -57,6 +57,8 @@ struct dmtimer_platform_data {
> u32 timer_errata;
> int (*get_context_loss_count)(struct device *);
> const struct omap_dm_timer_ops *timer_ops;
> + /* always-on timers can be used for clocksource/clockevent */
> + bool system_timer_capable;
> };
>
> #endif /* __PLATFORM_DATA_DMTIMER_OMAP_H__ */
>
> ---
> base-commit: e30626823a406725ce29bc75cb8ec467d3e1e326
> change-id: 20260828-v7-3-next-topic-ti-timer-dm-clocksource-omap-fix-418786f115bc
>
> Best regards,
> --
> Markus Schneider-Pargmann (TI) <msp@baylibre.com>
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654
2026-08-28 21:04 ` Andreas Kemnade
@ 2026-08-29 7:23 ` H. Nikolaus Schaller
2026-08-31 17:44 ` Kevin Hilman
2026-09-16 9:02 ` Markus Schneider-Pargmann
0 siblings, 2 replies; 6+ messages in thread
From: H. Nikolaus Schaller @ 2026-08-29 7:23 UTC (permalink / raw)
To: Markus Schneider-Pargmann (TI)
Cc: Andreas Kemnade, Daniel Lezcano, Thomas Gleixner, linux-kernel,
linux-arm-kernel, linux-omap, letux-kernel
> Am 28.08.2026 um 23:04 schrieb Andreas Kemnade <andreas@kemnade.info>:
>
> On Fri, 28 Aug 2026 20:47:45 +0200
> "Markus Schneider-Pargmann (TI)" <msp@baylibre.com> wrote:
>
>> Registering clocksource/clockevent for the older platforms breaks
>> booting them. The older platforms have their own implementation in early
>> boot that is used to register clocksource/clockevent in
>> timer-ti-dm-systimer.c.
>>
>> With am654, the timer is much more complex with more dependencies so
>> doing this in early boot with the other driver is very difficult and
>> gets ugly. Instead it is implemented in the platform driver for am654.
>> However the old platforms may not register clocksource/clockevent in
>> this driver as that would break the boot.
>>
>> Add a system_timer_capable flag that is only set for am654-timer that
>> gates the clocksource/clockevent registration.
>>
>> Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
>> Closes: https://lore.kernel.org/r/2013A99A-0502-4128-ACFA-B04886224393@goldelico.com
>> Fixes: b8eeeca55456 ("clocksource/drivers/timer-ti-dm: Add clocksource support")
>> Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
>
> Tested-by: Andreas Kemnade <andreas@kemnade.info> # OMAP3 GTA04
Tested-by: H. Nikolaus Schaller <hns@goldelico.com> # OMAP3 OpenPandora
BR and thanks,
Nikolaus
PS: I would suggest that patches for omap-dm-timer are also routed to linux-omap@vger.kernel.org
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654
2026-08-29 7:23 ` H. Nikolaus Schaller
@ 2026-08-31 17:44 ` Kevin Hilman
2026-09-16 9:02 ` Markus Schneider-Pargmann
1 sibling, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2026-08-31 17:44 UTC (permalink / raw)
To: H. Nikolaus Schaller, Markus Schneider-Pargmann (TI)
Cc: Andreas Kemnade, Daniel Lezcano, Thomas Gleixner, linux-kernel,
linux-arm-kernel, linux-omap, letux-kernel
"H. Nikolaus Schaller" <hns@goldelico.com> writes:
>> Am 28.08.2026 um 23:04 schrieb Andreas Kemnade <andreas@kemnade.info>:
>>
>> On Fri, 28 Aug 2026 20:47:45 +0200
>> "Markus Schneider-Pargmann (TI)" <msp@baylibre.com> wrote:
>>
>>> Registering clocksource/clockevent for the older platforms breaks
>>> booting them. The older platforms have their own implementation in early
>>> boot that is used to register clocksource/clockevent in
>>> timer-ti-dm-systimer.c.
>>>
>>> With am654, the timer is much more complex with more dependencies so
>>> doing this in early boot with the other driver is very difficult and
>>> gets ugly. Instead it is implemented in the platform driver for am654.
>>> However the old platforms may not register clocksource/clockevent in
>>> this driver as that would break the boot.
>>>
>>> Add a system_timer_capable flag that is only set for am654-timer that
>>> gates the clocksource/clockevent registration.
>>>
>>> Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
>>> Closes: https://lore.kernel.org/r/2013A99A-0502-4128-ACFA-B04886224393@goldelico.com
>>> Fixes: b8eeeca55456 ("clocksource/drivers/timer-ti-dm: Add clocksource support")
>>> Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
>>
>> Tested-by: Andreas Kemnade <andreas@kemnade.info> # OMAP3 GTA04
>
> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> # OMAP3 OpenPandora
>
Tested-by: Kevin Hilman <khilman@baylibre.com> # OMAP3 Beagle XM
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654
2026-08-29 7:23 ` H. Nikolaus Schaller
2026-08-31 17:44 ` Kevin Hilman
@ 2026-09-16 9:02 ` Markus Schneider-Pargmann
1 sibling, 0 replies; 6+ messages in thread
From: Markus Schneider-Pargmann @ 2026-09-16 9:02 UTC (permalink / raw)
To: H. Nikolaus Schaller, Markus Schneider-Pargmann (TI)
Cc: Andreas Kemnade, Daniel Lezcano, Thomas Gleixner, linux-kernel,
linux-arm-kernel, linux-omap, letux-kernel
[-- Attachment #1: Type: text/plain, Size: 1649 bytes --]
On Sat Aug 29, 2026 at 9:23 AM CEST, H. Nikolaus Schaller wrote:
>
>> Am 28.08.2026 um 23:04 schrieb Andreas Kemnade <andreas@kemnade.info>:
>>
>> On Fri, 28 Aug 2026 20:47:45 +0200
>> "Markus Schneider-Pargmann (TI)" <msp@baylibre.com> wrote:
>>
>>> Registering clocksource/clockevent for the older platforms breaks
>>> booting them. The older platforms have their own implementation in early
>>> boot that is used to register clocksource/clockevent in
>>> timer-ti-dm-systimer.c.
>>>
>>> With am654, the timer is much more complex with more dependencies so
>>> doing this in early boot with the other driver is very difficult and
>>> gets ugly. Instead it is implemented in the platform driver for am654.
>>> However the old platforms may not register clocksource/clockevent in
>>> this driver as that would break the boot.
>>>
>>> Add a system_timer_capable flag that is only set for am654-timer that
>>> gates the clocksource/clockevent registration.
>>>
>>> Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
>>> Closes: https://lore.kernel.org/r/2013A99A-0502-4128-ACFA-B04886224393@goldelico.com
>>> Fixes: b8eeeca55456 ("clocksource/drivers/timer-ti-dm: Add clocksource support")
>>> Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
>>
>> Tested-by: Andreas Kemnade <andreas@kemnade.info> # OMAP3 GTA04
>
> Tested-by: H. Nikolaus Schaller <hns@goldelico.com> # OMAP3 OpenPandora
>
> BR and thanks,
> Nikolaus
>
> PS: I would suggest that patches for omap-dm-timer are also routed to linux-omap@vger.kernel.org
I agree, it should be added to the MAINTAINERS file.
Best
Markus
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 289 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654
2026-08-28 18:47 [PATCH] clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654 Markus Schneider-Pargmann (TI)
2026-08-28 21:04 ` Andreas Kemnade
@ 2026-09-16 8:59 ` Markus Schneider-Pargmann
1 sibling, 0 replies; 6+ messages in thread
From: Markus Schneider-Pargmann @ 2026-09-16 8:59 UTC (permalink / raw)
To: Markus Schneider-Pargmann (TI), Daniel Lezcano, Thomas Gleixner
Cc: H. Nikolaus Schaller, Andreas Kemnade, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1155 bytes --]
Hi Daniel,
On Fri Aug 28, 2026 at 8:47 PM CEST, Markus Schneider-Pargmann (TI) wrote:
> Registering clocksource/clockevent for the older platforms breaks
> booting them. The older platforms have their own implementation in early
> boot that is used to register clocksource/clockevent in
> timer-ti-dm-systimer.c.
>
> With am654, the timer is much more complex with more dependencies so
> doing this in early boot with the other driver is very difficult and
> gets ugly. Instead it is implemented in the platform driver for am654.
> However the old platforms may not register clocksource/clockevent in
> this driver as that would break the boot.
>
> Add a system_timer_capable flag that is only set for am654-timer that
> gates the clocksource/clockevent registration.
>
> Reported-by: H. Nikolaus Schaller <hns@goldelico.com>
> Closes: https://lore.kernel.org/r/2013A99A-0502-4128-ACFA-B04886224393@goldelico.com
> Fixes: b8eeeca55456 ("clocksource/drivers/timer-ti-dm: Add clocksource support")
> Signed-off-by: Markus Schneider-Pargmann (TI) <msp@baylibre.com>
Did you have time to take a look at this patch?
Thanks,
Markus
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 289 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-09-16 9:02 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-28 18:47 [PATCH] clocksource/drivers/timer-ti-dm: Register clocksource/event only for am654 Markus Schneider-Pargmann (TI)
2026-08-28 21:04 ` Andreas Kemnade
2026-08-29 7:23 ` H. Nikolaus Schaller
2026-08-31 17:44 ` Kevin Hilman
2026-09-16 9:02 ` Markus Schneider-Pargmann
2026-09-16 8:59 ` Markus Schneider-Pargmann
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®