From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Change the OSTM driver's probe condition to `CONFIG_ARM64` so that the
platform driver will defer and reprobe on any ARM64 Renesas SoC once its
reset controller is available. Previously, only RZ/G2L and RZ/V2H(P)
were covered.
By matching on `CONFIG_ARM64`, this avoids adding a new config entry
for each future ARM64 Renesas SoC with OSTM IP. RZ/A1 and RZ/A2 (ARM32)
are unaffected-they still use OSTM but do not define a resets property,
so the deferred reprobe mechanism is unnecessary.
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Hi Geert,
I've restored the Reviewed-by tag from v1 with your suggestions applied.
I hope you're okay with this.
Cheers, Prabhakar
v1->v2:
- Instead of adding config for new SoC, changed the probe condition to
`CONFIG_ARM64`.
- Updated commit message
- Added a Reviewed-by tag from Geert.
---
drivers/clocksource/renesas-ostm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clocksource/renesas-ostm.c b/drivers/clocksource/renesas-ostm.c
index 3fcbd02b2483..6a5785f9c9c1 100644
--- a/drivers/clocksource/renesas-ostm.c
+++ b/drivers/clocksource/renesas-ostm.c
@@ -225,7 +225,7 @@ static int __init ostm_init(struct device_node *np)
TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init);
-#if defined(CONFIG_ARCH_RZG2L) || defined(CONFIG_ARCH_R9A09G057)
+#if defined(CONFIG_ARM64)
static int __init ostm_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
--
2.49.0
Hi Prabhakar,
On Fri, 2 May 2025 at 14:47, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
>
> Change the OSTM driver's probe condition to `CONFIG_ARM64` so that the
> platform driver will defer and reprobe on any ARM64 Renesas SoC once its
> reset controller is available. Previously, only RZ/G2L and RZ/V2H(P)
> were covered.
>
> By matching on `CONFIG_ARM64`, this avoids adding a new config entry
> for each future ARM64 Renesas SoC with OSTM IP. RZ/A1 and RZ/A2 (ARM32)
> are unaffected-they still use OSTM but do not define a resets property,
> so the deferred reprobe mechanism is unnecessary.
>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> Hi Geert,
> I've restored the Reviewed-by tag from v1 with your suggestions applied.
> I hope you're okay with this.
> Cheers, Prabhakar
>
> v1->v2:
> - Instead of adding config for new SoC, changed the probe condition to
> `CONFIG_ARM64`.
> - Updated commit message
> - Added a Reviewed-by tag from Geert.
> ---
> drivers/clocksource/renesas-ostm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clocksource/renesas-ostm.c b/drivers/clocksource/renesas-ostm.c
> index 3fcbd02b2483..6a5785f9c9c1 100644
> --- a/drivers/clocksource/renesas-ostm.c
> +++ b/drivers/clocksource/renesas-ostm.c
> @@ -225,7 +225,7 @@ static int __init ostm_init(struct device_node *np)
>
> TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init);
>
> -#if defined(CONFIG_ARCH_RZG2L) || defined(CONFIG_ARCH_R9A09G057)
> +#if defined(CONFIG_ARM64)
Sorry, I've just realized RZ/Five also wants this.
"#ifndef CONFIG_ARM"?
> static int __init ostm_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert, On Fri, May 2, 2025 at 3:37 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote: > > Hi Prabhakar, > > On Fri, 2 May 2025 at 14:47, Prabhakar <prabhakar.csengg@gmail.com> wrote: > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > > > Change the OSTM driver's probe condition to `CONFIG_ARM64` so that the > > platform driver will defer and reprobe on any ARM64 Renesas SoC once its > > reset controller is available. Previously, only RZ/G2L and RZ/V2H(P) > > were covered. > > > > By matching on `CONFIG_ARM64`, this avoids adding a new config entry > > for each future ARM64 Renesas SoC with OSTM IP. RZ/A1 and RZ/A2 (ARM32) > > are unaffected-they still use OSTM but do not define a resets property, > > so the deferred reprobe mechanism is unnecessary. > > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > > --- > > Hi Geert, > > I've restored the Reviewed-by tag from v1 with your suggestions applied. > > I hope you're okay with this. > > Cheers, Prabhakar > > > > v1->v2: > > - Instead of adding config for new SoC, changed the probe condition to > > `CONFIG_ARM64`. > > - Updated commit message > > - Added a Reviewed-by tag from Geert. > > --- > > drivers/clocksource/renesas-ostm.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/clocksource/renesas-ostm.c b/drivers/clocksource/renesas-ostm.c > > index 3fcbd02b2483..6a5785f9c9c1 100644 > > --- a/drivers/clocksource/renesas-ostm.c > > +++ b/drivers/clocksource/renesas-ostm.c > > @@ -225,7 +225,7 @@ static int __init ostm_init(struct device_node *np) > > > > TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init); > > > > -#if defined(CONFIG_ARCH_RZG2L) || defined(CONFIG_ARCH_R9A09G057) > > +#if defined(CONFIG_ARM64) > > Sorry, I've just realized RZ/Five also wants this. > Ouch, I missed that too. > "#ifndef CONFIG_ARM"? > Im wondering will it harm if we have it enabled for ARM too (I dont have RZ/Ax to test it)? Cheers, Prabhakar
Hi Prabhakar,
On Fri, 2 May 2025 at 18:10, Lad, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> On Fri, May 2, 2025 at 3:37 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Fri, 2 May 2025 at 14:47, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > >
> > > Change the OSTM driver's probe condition to `CONFIG_ARM64` so that the
> > > platform driver will defer and reprobe on any ARM64 Renesas SoC once its
> > > reset controller is available. Previously, only RZ/G2L and RZ/V2H(P)
> > > were covered.
> > >
> > > By matching on `CONFIG_ARM64`, this avoids adding a new config entry
> > > for each future ARM64 Renesas SoC with OSTM IP. RZ/A1 and RZ/A2 (ARM32)
> > > are unaffected-they still use OSTM but do not define a resets property,
> > > so the deferred reprobe mechanism is unnecessary.
> > >
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > ---
> > > Hi Geert,
> > > I've restored the Reviewed-by tag from v1 with your suggestions applied.
> > > I hope you're okay with this.
> > > Cheers, Prabhakar
> > >
> > > v1->v2:
> > > - Instead of adding config for new SoC, changed the probe condition to
> > > `CONFIG_ARM64`.
> > > - Updated commit message
> > > - Added a Reviewed-by tag from Geert.
> > > ---
> > > drivers/clocksource/renesas-ostm.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/clocksource/renesas-ostm.c b/drivers/clocksource/renesas-ostm.c
> > > index 3fcbd02b2483..6a5785f9c9c1 100644
> > > --- a/drivers/clocksource/renesas-ostm.c
> > > +++ b/drivers/clocksource/renesas-ostm.c
> > > @@ -225,7 +225,7 @@ static int __init ostm_init(struct device_node *np)
> > >
> > > TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init);
> > >
> > > -#if defined(CONFIG_ARCH_RZG2L) || defined(CONFIG_ARCH_R9A09G057)
> > > +#if defined(CONFIG_ARM64)
> >
> > Sorry, I've just realized RZ/Five also wants this.
> >
> Ouch, I missed that too.
>
> > "#ifndef CONFIG_ARM"?
> >
> Im wondering will it harm if we have it enabled for ARM too (I dont
> have RZ/Ax to test it)?
ISTR it caused issues on RZ/Ax.
Oh right, and those got fixed by commit 37385c0772a4fc6b
("clocksource/drivers/renesas-ostm: Avoid reprobe after successful
early probe") in v6.10. So I think it is safe to drop the #ifdef
check instead of extending it.
FTR, with the platform probe enabled, and 37385c0772a4fc6b reverted:
/soc/timer@e803b000: used for clock events
genirq: Flags mismatch irq 16. 00215201 (timer@e803c000) vs.
00215201 (timer@e803c000)
Failed to request irq 16 for /soc/timer@e803c000
renesas_ostm e803c000.timer: probe with driver renesas_ostm failed
with error -16
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert,
On Fri, May 2, 2025 at 6:36 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Prabhakar,
>
> On Fri, 2 May 2025 at 18:10, Lad, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> > On Fri, May 2, 2025 at 3:37 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > > On Fri, 2 May 2025 at 14:47, Prabhakar <prabhakar.csengg@gmail.com> wrote:
> > > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > >
> > > > Change the OSTM driver's probe condition to `CONFIG_ARM64` so that the
> > > > platform driver will defer and reprobe on any ARM64 Renesas SoC once its
> > > > reset controller is available. Previously, only RZ/G2L and RZ/V2H(P)
> > > > were covered.
> > > >
> > > > By matching on `CONFIG_ARM64`, this avoids adding a new config entry
> > > > for each future ARM64 Renesas SoC with OSTM IP. RZ/A1 and RZ/A2 (ARM32)
> > > > are unaffected-they still use OSTM but do not define a resets property,
> > > > so the deferred reprobe mechanism is unnecessary.
> > > >
> > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> > > > ---
> > > > Hi Geert,
> > > > I've restored the Reviewed-by tag from v1 with your suggestions applied.
> > > > I hope you're okay with this.
> > > > Cheers, Prabhakar
> > > >
> > > > v1->v2:
> > > > - Instead of adding config for new SoC, changed the probe condition to
> > > > `CONFIG_ARM64`.
> > > > - Updated commit message
> > > > - Added a Reviewed-by tag from Geert.
> > > > ---
> > > > drivers/clocksource/renesas-ostm.c | 2 +-
> > > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/drivers/clocksource/renesas-ostm.c b/drivers/clocksource/renesas-ostm.c
> > > > index 3fcbd02b2483..6a5785f9c9c1 100644
> > > > --- a/drivers/clocksource/renesas-ostm.c
> > > > +++ b/drivers/clocksource/renesas-ostm.c
> > > > @@ -225,7 +225,7 @@ static int __init ostm_init(struct device_node *np)
> > > >
> > > > TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init);
> > > >
> > > > -#if defined(CONFIG_ARCH_RZG2L) || defined(CONFIG_ARCH_R9A09G057)
> > > > +#if defined(CONFIG_ARM64)
> > >
> > > Sorry, I've just realized RZ/Five also wants this.
> > >
> > Ouch, I missed that too.
> >
> > > "#ifndef CONFIG_ARM"?
> > >
> > Im wondering will it harm if we have it enabled for ARM too (I dont
> > have RZ/Ax to test it)?
>
> ISTR it caused issues on RZ/Ax.
>
> Oh right, and those got fixed by commit 37385c0772a4fc6b
> ("clocksource/drivers/renesas-ostm: Avoid reprobe after successful
> early probe") in v6.10. So I think it is safe to drop the #ifdef
> check instead of extending it.
>
Thanks for the confirmation. I'll drop the ifdef checks and send a v3 for this.
> FTR, with the platform probe enabled, and 37385c0772a4fc6b reverted:
>
> /soc/timer@e803b000: used for clock events
> genirq: Flags mismatch irq 16. 00215201 (timer@e803c000) vs.
> 00215201 (timer@e803c000)
> Failed to request irq 16 for /soc/timer@e803c000
> renesas_ostm e803c000.timer: probe with driver renesas_ostm failed
> with error -16
>
Cheers,
Prabhakar
© 2016 - 2026 Red Hat, Inc.