* [PATCH 1/2] arm: v7m: Allow SYS_ARCH_TIMER here
@ 2025-08-13 20:55 Tom Rini
2025-08-13 20:55 ` [PATCH 2/2] timer: Mark this as incompatible with SYS_ARCH_TIMER Tom Rini
2025-10-11 17:07 ` (subset) [PATCH 1/2] arm: v7m: Allow SYS_ARCH_TIMER here Tom Rini
0 siblings, 2 replies; 8+ messages in thread
From: Tom Rini @ 2025-08-13 20:55 UTC (permalink / raw)
To: u-boot
We have had an implementation of the generic timer found in many v7m
chips since 2017, but as part of the Kconfig migration forgot to allow
it as it wasn't being used at the time. Allow it to be built.
Signed-off-by: Tom Rini <trini@konsulko.com>
---
arch/arm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 40368abc297e..73b4aad28b50 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -445,7 +445,7 @@ config ARCH_CPU_INIT
config SYS_ARCH_TIMER
bool "ARM Generic Timer support"
- depends on CPU_V7A || ARM64
+ depends on CPU_V7A || CPU_V7M || ARM64
default y if ARM64
help
The ARM Generic Timer (aka arch-timer) provides an architected
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] timer: Mark this as incompatible with SYS_ARCH_TIMER
2025-08-13 20:55 [PATCH 1/2] arm: v7m: Allow SYS_ARCH_TIMER here Tom Rini
@ 2025-08-13 20:55 ` Tom Rini
2025-08-14 16:26 ` Marius Dinu
2025-10-11 17:07 ` (subset) [PATCH 1/2] arm: v7m: Allow SYS_ARCH_TIMER here Tom Rini
1 sibling, 1 reply; 8+ messages in thread
From: Tom Rini @ 2025-08-13 20:55 UTC (permalink / raw)
To: u-boot; +Cc: Marius Dinu
The timers implemented under SYS_ARCH_TIMER are not part of the TIMER
framework and thus cannot be enabled at the same time. Express this
dependency in Kconfig and add a note to the help of SYS_ARCH_TIMER.
Reported-by: Marius Dinu <m95d+git@psihoexpert.ro>
Signed-off-by: Tom Rini <trini@konsulko.com>
---
Marius, I ended up reworking things a bit (and also found part 1/2 of
this series) but please let me know if you feel this should retain your
Author and such instead. Thanks!
---
arch/arm/Kconfig | 1 +
drivers/timer/Kconfig | 1 +
2 files changed, 2 insertions(+)
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 73b4aad28b50..0dba2e2c8567 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -452,6 +452,7 @@ config SYS_ARCH_TIMER
interface to a timer source on an SoC.
It is mandatory for ARMv8 implementation and widely available
on ARMv7 systems.
+ This timer driver is incompatible with the DM timer framework.
config ARM_SMCCC
bool "Support for ARM SMC Calling Convention (SMCCC)"
diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
index cb6fc0e7fda8..2ab4d971dffa 100644
--- a/drivers/timer/Kconfig
+++ b/drivers/timer/Kconfig
@@ -2,6 +2,7 @@ menu "Timer Support"
config TIMER
bool "Enable driver model for timer drivers"
+ depends on !SYS_ARCH_TIMER
depends on DM
help
Enable driver model for timer access. It uses the same API as
--
2.43.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] timer: Mark this as incompatible with SYS_ARCH_TIMER
2025-08-13 20:55 ` [PATCH 2/2] timer: Mark this as incompatible with SYS_ARCH_TIMER Tom Rini
@ 2025-08-14 16:26 ` Marius Dinu
2025-08-14 16:40 ` Tom Rini
0 siblings, 1 reply; 8+ messages in thread
From: Marius Dinu @ 2025-08-14 16:26 UTC (permalink / raw)
To: Tom Rini; +Cc: u-boot, Marius Dinu
On Wed, 2025-08-13 14.55.11 +-0600, Tom Rini wrote:
> The timers implemented under SYS_ARCH_TIMER are not part of the TIMER
> framework and thus cannot be enabled at the same time. Express this
> dependency in Kconfig and add a note to the help of SYS_ARCH_TIMER.
>
> Reported-by: Marius Dinu <m95d+git@psihoexpert.ro>
> Signed-off-by: Tom Rini <trini@konsulko.com>
> ---
> Marius, I ended up reworking things a bit (and also found part 1/2 of
> this series) but please let me know if you feel this should retain your
> Author and such instead. Thanks!
No need for credits.
I think you should keep the warning message in the Timer drivers menu.
It provides a quick explanation why the menu is empty.
Bugs are reported in this mailing list too?
Thanks!
> ---
> arch/arm/Kconfig | 1 +
> drivers/timer/Kconfig | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> index 73b4aad28b50..0dba2e2c8567 100644
> --- a/arch/arm/Kconfig
> +++ b/arch/arm/Kconfig
> @@ -452,6 +452,7 @@ config SYS_ARCH_TIMER
> interface to a timer source on an SoC.
> It is mandatory for ARMv8 implementation and widely available
> on ARMv7 systems.
> + This timer driver is incompatible with the DM timer framework.
>
> config ARM_SMCCC
> bool "Support for ARM SMC Calling Convention (SMCCC)"
> diff --git a/drivers/timer/Kconfig b/drivers/timer/Kconfig
> index cb6fc0e7fda8..2ab4d971dffa 100644
> --- a/drivers/timer/Kconfig
> +++ b/drivers/timer/Kconfig
> @@ -2,6 +2,7 @@ menu "Timer Support"
>
> config TIMER
> bool "Enable driver model for timer drivers"
> + depends on !SYS_ARCH_TIMER
> depends on DM
> help
> Enable driver model for timer access. It uses the same API as
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] timer: Mark this as incompatible with SYS_ARCH_TIMER
2025-08-14 16:26 ` Marius Dinu
@ 2025-08-14 16:40 ` Tom Rini
2025-08-14 18:10 ` Marius Dinu
0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2025-08-14 16:40 UTC (permalink / raw)
To: Marius Dinu; +Cc: u-boot
[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]
On Thu, Aug 14, 2025 at 07:26:47PM +0300, Marius Dinu wrote:
> On Wed, 2025-08-13 14.55.11 +-0600, Tom Rini wrote:
> > The timers implemented under SYS_ARCH_TIMER are not part of the TIMER
> > framework and thus cannot be enabled at the same time. Express this
> > dependency in Kconfig and add a note to the help of SYS_ARCH_TIMER.
> >
> > Reported-by: Marius Dinu <m95d+git@psihoexpert.ro>
> > Signed-off-by: Tom Rini <trini@konsulko.com>
> > ---
> > Marius, I ended up reworking things a bit (and also found part 1/2 of
> > this series) but please let me know if you feel this should retain your
> > Author and such instead. Thanks!
>
> No need for credits.
OK.
> I think you should keep the warning message in the Timer drivers menu.
> It provides a quick explanation why the menu is empty.
I thought about it, and we don't do anything like that for other
either/or choices, and it's now in the help text itself at least. The
other thing however, is that a few platforms do allow for both, because
they play some games with CFG_SYS_TIMER* defines. So I'm not entirely
sure what to do here.
> Bugs are reported in this mailing list too?
Yes.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] timer: Mark this as incompatible with SYS_ARCH_TIMER
2025-08-14 16:40 ` Tom Rini
@ 2025-08-14 18:10 ` Marius Dinu
2025-10-11 18:00 ` Tom Rini
0 siblings, 1 reply; 8+ messages in thread
From: Marius Dinu @ 2025-08-14 18:10 UTC (permalink / raw)
To: Tom Rini; +Cc: Marius Dinu, u-boot
On Thu, 2025-08-14 10.40.21 +-0600, Tom Rini wrote:
> On Thu, Aug 14, 2025 at 07:26:47PM +0300, Marius Dinu wrote:
> > On Wed, 2025-08-13 14.55.11 +-0600, Tom Rini wrote:
> > > The timers implemented under SYS_ARCH_TIMER are not part of the TIMER
> > > framework and thus cannot be enabled at the same time. Express this
> > > dependency in Kconfig and add a note to the help of SYS_ARCH_TIMER.
> > >
> > > Reported-by: Marius Dinu <m95d+git@psihoexpert.ro>
> > > Signed-off-by: Tom Rini <trini@konsulko.com>
> > > ---
> > > Marius, I ended up reworking things a bit (and also found part 1/2 of
> > > this series) but please let me know if you feel this should retain your
> > > Author and such instead. Thanks!
> >
> > No need for credits.
>
> OK.
>
> > I think you should keep the warning message in the Timer drivers menu.
> > It provides a quick explanation why the menu is empty.
>
> I thought about it, and we don't do anything like that for other
> either/or choices, and it's now in the help text itself at least. The
> other thing however, is that a few platforms do allow for both, because
> they play some games with CFG_SYS_TIMER* defines. So I'm not entirely
> sure what to do here.
>
> > Bugs are reported in this mailing list too?
>
> Yes.
>
> --
> Tom
With the original patch I only tried to reduce the number of compilation
failures. I encounter a lot. I'm no expert and I can only try to fix little
things such as this one.
I belive some people (like myself) would be confused by an empty menu and
would not immediately remember the SYS_ARCH_TIMER in a completely different
part of menuconfig.
I tried to find configs with both CONFIG_SYS_ARCH_TIMER and CONFIG_TIMER
enabled amd I couldn't find any. So it's probably OK to leave the patch as it
is and exceptions, if needed, can be added later.
PS: I saw your other patches that add dependencies on platform type.
Nice work, really needed!
Marius
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: (subset) [PATCH 1/2] arm: v7m: Allow SYS_ARCH_TIMER here
2025-08-13 20:55 [PATCH 1/2] arm: v7m: Allow SYS_ARCH_TIMER here Tom Rini
2025-08-13 20:55 ` [PATCH 2/2] timer: Mark this as incompatible with SYS_ARCH_TIMER Tom Rini
@ 2025-10-11 17:07 ` Tom Rini
1 sibling, 0 replies; 8+ messages in thread
From: Tom Rini @ 2025-10-11 17:07 UTC (permalink / raw)
To: u-boot, Tom Rini
On Wed, 13 Aug 2025 14:55:10 -0600, Tom Rini wrote:
> We have had an implementation of the generic timer found in many v7m
> chips since 2017, but as part of the Kconfig migration forgot to allow
> it as it wasn't being used at the time. Allow it to be built.
>
>
Applied to u-boot/master, thanks!
[1/2] arm: v7m: Allow SYS_ARCH_TIMER here
commit: 9de2fc9878e7a79752fab26312f9d160b4103e3e
--
Tom
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] timer: Mark this as incompatible with SYS_ARCH_TIMER
2025-08-14 18:10 ` Marius Dinu
@ 2025-10-11 18:00 ` Tom Rini
2025-10-14 12:15 ` Marius Dinu
0 siblings, 1 reply; 8+ messages in thread
From: Tom Rini @ 2025-10-11 18:00 UTC (permalink / raw)
To: Marius Dinu; +Cc: u-boot
[-- Attachment #1: Type: text/plain, Size: 2337 bytes --]
On Thu, Aug 14, 2025 at 09:10:49PM +0300, Marius Dinu wrote:
> On Thu, 2025-08-14 10.40.21 +-0600, Tom Rini wrote:
> > On Thu, Aug 14, 2025 at 07:26:47PM +0300, Marius Dinu wrote:
> > > On Wed, 2025-08-13 14.55.11 +-0600, Tom Rini wrote:
> > > > The timers implemented under SYS_ARCH_TIMER are not part of the TIMER
> > > > framework and thus cannot be enabled at the same time. Express this
> > > > dependency in Kconfig and add a note to the help of SYS_ARCH_TIMER.
> > > >
> > > > Reported-by: Marius Dinu <m95d+git@psihoexpert.ro>
> > > > Signed-off-by: Tom Rini <trini@konsulko.com>
> > > > ---
> > > > Marius, I ended up reworking things a bit (and also found part 1/2 of
> > > > this series) but please let me know if you feel this should retain your
> > > > Author and such instead. Thanks!
> > >
> > > No need for credits.
> >
> > OK.
> >
> > > I think you should keep the warning message in the Timer drivers menu.
> > > It provides a quick explanation why the menu is empty.
> >
> > I thought about it, and we don't do anything like that for other
> > either/or choices, and it's now in the help text itself at least. The
> > other thing however, is that a few platforms do allow for both, because
> > they play some games with CFG_SYS_TIMER* defines. So I'm not entirely
> > sure what to do here.
> >
> > > Bugs are reported in this mailing list too?
> >
> > Yes.
> >
> > --
> > Tom
>
> With the original patch I only tried to reduce the number of compilation
> failures. I encounter a lot. I'm no expert and I can only try to fix little
> things such as this one.
>
> I belive some people (like myself) would be confused by an empty menu and
> would not immediately remember the SYS_ARCH_TIMER in a completely different
> part of menuconfig.
>
>
> I tried to find configs with both CONFIG_SYS_ARCH_TIMER and CONFIG_TIMER
> enabled amd I couldn't find any. So it's probably OK to leave the patch as it
> is and exceptions, if needed, can be added later.
I haven't forgotten about this, sorry. I'm just debating with myself
what's best here, because another part of the proper solution is that we
should get the generic ARMv8 timer on moved to the framework too, but
it's more easily said than done, but I have asked some people to look in
to it.
--
Tom
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] timer: Mark this as incompatible with SYS_ARCH_TIMER
2025-10-11 18:00 ` Tom Rini
@ 2025-10-14 12:15 ` Marius Dinu
0 siblings, 0 replies; 8+ messages in thread
From: Marius Dinu @ 2025-10-14 12:15 UTC (permalink / raw)
To: Tom Rini; +Cc: Marius Dinu, u-boot
On Sat, 2025-10-11 12.00.23 +-0600, Tom Rini wrote:
> On Thu, Aug 14, 2025 at 09:10:49PM +0300, Marius Dinu wrote:
> > On Thu, 2025-08-14 10.40.21 +-0600, Tom Rini wrote:
> > > On Thu, Aug 14, 2025 at 07:26:47PM +0300, Marius Dinu wrote:
> > > > On Wed, 2025-08-13 14.55.11 +-0600, Tom Rini wrote:
> > > > > The timers implemented under SYS_ARCH_TIMER are not part of the TIMER
> > > > > framework and thus cannot be enabled at the same time. Express this
> > > > > dependency in Kconfig and add a note to the help of SYS_ARCH_TIMER.
> > > > >
> > > > > Reported-by: Marius Dinu <m95d+git@psihoexpert.ro>
> > > > > Signed-off-by: Tom Rini <trini@konsulko.com>
> > > > > ---
> > > > > Marius, I ended up reworking things a bit (and also found part 1/2 of
> > > > > this series) but please let me know if you feel this should retain your
> > > > > Author and such instead. Thanks!
> > > >
> > > > No need for credits.
> > >
> > > OK.
> > >
> > > > I think you should keep the warning message in the Timer drivers menu.
> > > > It provides a quick explanation why the menu is empty.
> > >
> > > I thought about it, and we don't do anything like that for other
> > > either/or choices, and it's now in the help text itself at least. The
> > > other thing however, is that a few platforms do allow for both, because
> > > they play some games with CFG_SYS_TIMER* defines. So I'm not entirely
> > > sure what to do here.
> > >
> > > > Bugs are reported in this mailing list too?
> > >
> > > Yes.
> > >
> > > --
> > > Tom
> >
> > With the original patch I only tried to reduce the number of compilation
> > failures. I encounter a lot. I'm no expert and I can only try to fix little
> > things such as this one.
> >
> > I belive some people (like myself) would be confused by an empty menu and
> > would not immediately remember the SYS_ARCH_TIMER in a completely different
> > part of menuconfig.
> >
> >
> > I tried to find configs with both CONFIG_SYS_ARCH_TIMER and CONFIG_TIMER
> > enabled amd I couldn't find any. So it's probably OK to leave the patch as it
> > is and exceptions, if needed, can be added later.
>
> I haven't forgotten about this, sorry. I'm just debating with myself
> what's best here, because another part of the proper solution is that we
> should get the generic ARMv8 timer on moved to the framework too, but
> it's more easily said than done, but I have asked some people to look in
> to it.
>
> --
> Tom
No hurry. Take your time.
Marius
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-10-14 12:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-13 20:55 [PATCH 1/2] arm: v7m: Allow SYS_ARCH_TIMER here Tom Rini
2025-08-13 20:55 ` [PATCH 2/2] timer: Mark this as incompatible with SYS_ARCH_TIMER Tom Rini
2025-08-14 16:26 ` Marius Dinu
2025-08-14 16:40 ` Tom Rini
2025-08-14 18:10 ` Marius Dinu
2025-10-11 18:00 ` Tom Rini
2025-10-14 12:15 ` Marius Dinu
2025-10-11 17:07 ` (subset) [PATCH 1/2] arm: v7m: Allow SYS_ARCH_TIMER here Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox