linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add support for Renesas OSTM on RZ/V2N SoC
@ 2025-05-02 12:46 Prabhakar
  2025-05-02 12:46 ` [PATCH v2 1/2] dt-bindings: timer: renesas,ostm: Document RZ/V2N (R9A09G056) support Prabhakar
  2025-05-02 12:46 ` [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Enable reprobe for all ARM64 SoCs Prabhakar
  0 siblings, 2 replies; 8+ messages in thread
From: Prabhakar @ 2025-05-02 12:46 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maxime Coquelin, Alexandre Torgue,
	Geert Uytterhoeven, Magnus Damm, Chris Brandt
  Cc: linux-kernel, devicetree, linux-stm32, linux-arm-kernel,
	linux-renesas-soc, Prabhakar, Biju Das, Fabrizio Castro,
	Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Hi all,

This patch series adds support for the Renesas OS Timer (OSTM) found on
the Renesas RZ/V2N (R9A09G056) SoC. The OSTM IP on RZ/V2N is identical to
that on other RZ families.

v1->v2:
- Inveted the logic in the dt-bindings to require the "resets" property
- Instead of adding config for new SoC, changed the probe condition to
  `CONFIG_ARM64`.
- Updated commit messages
- Added a Reviewed-by tag from Geert.

v1:
https://lore.kernel.org/all/20250501123709.56513-1-prabhakar.mahadev-lad.rj@bp.renesas.com/

Cheers,
Prabhakar

Lad Prabhakar (2):
  dt-bindings: timer: renesas,ostm: Document RZ/V2N (R9A09G056) support
  clocksource/drivers/renesas-ostm: Enable reprobe for all ARM64 SoCs

 .../devicetree/bindings/timer/renesas,ostm.yaml      | 12 ++++++------
 drivers/clocksource/renesas-ostm.c                   |  2 +-
 2 files changed, 7 insertions(+), 7 deletions(-)

-- 
2.49.0



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

* [PATCH v2 1/2] dt-bindings: timer: renesas,ostm: Document RZ/V2N (R9A09G056) support
  2025-05-02 12:46 [PATCH v2 0/2] Add support for Renesas OSTM on RZ/V2N SoC Prabhakar
@ 2025-05-02 12:46 ` Prabhakar
  2025-05-02 16:31   ` Conor Dooley
  2025-05-02 12:46 ` [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Enable reprobe for all ARM64 SoCs Prabhakar
  1 sibling, 1 reply; 8+ messages in thread
From: Prabhakar @ 2025-05-02 12:46 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maxime Coquelin, Alexandre Torgue,
	Geert Uytterhoeven, Magnus Damm, Chris Brandt
  Cc: linux-kernel, devicetree, linux-stm32, linux-arm-kernel,
	linux-renesas-soc, Prabhakar, Biju Das, Fabrizio Castro,
	Lad Prabhakar

From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Document support for the Renesas OS Timer (OSTM) found on the Renesas
RZ/V2N (R9A09G056) SoC. The OSTM IP on RZ/V2N is identical to that on
other RZ families, so no driver changes are required as `renesas,ostm`
will be used as fallback compatible.

Also update the bindings to require the "resets" property for RZ/V2N
by inverting the logic: all SoCs except RZ/A1 and RZ/A2 now require
the "resets" property.

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:
- Inveted the logic in the dt-bindings to require the "resets" property
- Updated commit message
- Added a Reviewed-by tag from Geert.
---
 .../devicetree/bindings/timer/renesas,ostm.yaml      | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/timer/renesas,ostm.yaml b/Documentation/devicetree/bindings/timer/renesas,ostm.yaml
index 9ba858f094ab..0983c1efec80 100644
--- a/Documentation/devicetree/bindings/timer/renesas,ostm.yaml
+++ b/Documentation/devicetree/bindings/timer/renesas,ostm.yaml
@@ -26,6 +26,7 @@ properties:
           - renesas,r9a07g043-ostm # RZ/G2UL and RZ/Five
           - renesas,r9a07g044-ostm # RZ/G2{L,LC}
           - renesas,r9a07g054-ostm # RZ/V2L
+          - renesas,r9a09g056-ostm # RZ/V2N
           - renesas,r9a09g057-ostm # RZ/V2H(P)
       - const: renesas,ostm        # Generic
 
@@ -54,12 +55,11 @@ required:
 if:
   properties:
     compatible:
-      contains:
-        enum:
-          - renesas,r9a07g043-ostm
-          - renesas,r9a07g044-ostm
-          - renesas,r9a07g054-ostm
-          - renesas,r9a09g057-ostm
+      not:
+        contains:
+          enum:
+            - renesas,r7s72100-ostm
+            - renesas,r7s9210-ostm
 then:
   required:
     - resets
-- 
2.49.0



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

* [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Enable reprobe for all ARM64 SoCs
  2025-05-02 12:46 [PATCH v2 0/2] Add support for Renesas OSTM on RZ/V2N SoC Prabhakar
  2025-05-02 12:46 ` [PATCH v2 1/2] dt-bindings: timer: renesas,ostm: Document RZ/V2N (R9A09G056) support Prabhakar
@ 2025-05-02 12:46 ` Prabhakar
  2025-05-02 14:37   ` Geert Uytterhoeven
  1 sibling, 1 reply; 8+ messages in thread
From: Prabhakar @ 2025-05-02 12:46 UTC (permalink / raw)
  To: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maxime Coquelin, Alexandre Torgue,
	Geert Uytterhoeven, Magnus Damm, Chris Brandt
  Cc: linux-kernel, devicetree, linux-stm32, linux-arm-kernel,
	linux-renesas-soc, Prabhakar, Biju Das, Fabrizio Castro,
	Lad Prabhakar

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



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

* Re: [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Enable reprobe for all ARM64 SoCs
  2025-05-02 12:46 ` [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Enable reprobe for all ARM64 SoCs Prabhakar
@ 2025-05-02 14:37   ` Geert Uytterhoeven
  2025-05-02 16:09     ` Lad, Prabhakar
  0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2025-05-02 14:37 UTC (permalink / raw)
  To: Prabhakar
  Cc: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maxime Coquelin, Alexandre Torgue,
	Geert Uytterhoeven, Magnus Damm, Chris Brandt, linux-kernel,
	devicetree, linux-stm32, linux-arm-kernel, linux-renesas-soc,
	Biju Das, Fabrizio Castro, Lad Prabhakar

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


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

* Re: [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Enable reprobe for all ARM64 SoCs
  2025-05-02 14:37   ` Geert Uytterhoeven
@ 2025-05-02 16:09     ` Lad, Prabhakar
  2025-05-02 17:36       ` Geert Uytterhoeven
  0 siblings, 1 reply; 8+ messages in thread
From: Lad, Prabhakar @ 2025-05-02 16:09 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maxime Coquelin, Alexandre Torgue,
	Geert Uytterhoeven, Magnus Damm, Chris Brandt, linux-kernel,
	devicetree, linux-stm32, linux-arm-kernel, linux-renesas-soc,
	Biju Das, Fabrizio Castro, Lad Prabhakar

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


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

* Re: [PATCH v2 1/2] dt-bindings: timer: renesas,ostm: Document RZ/V2N (R9A09G056) support
  2025-05-02 12:46 ` [PATCH v2 1/2] dt-bindings: timer: renesas,ostm: Document RZ/V2N (R9A09G056) support Prabhakar
@ 2025-05-02 16:31   ` Conor Dooley
  0 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2025-05-02 16:31 UTC (permalink / raw)
  To: Prabhakar
  Cc: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maxime Coquelin, Alexandre Torgue,
	Geert Uytterhoeven, Magnus Damm, Chris Brandt, linux-kernel,
	devicetree, linux-stm32, linux-arm-kernel, linux-renesas-soc,
	Biju Das, Fabrizio Castro, Lad Prabhakar

[-- Attachment #1: Type: text/plain, Size: 756 bytes --]

On Fri, May 02, 2025 at 01:46:26PM +0100, Prabhakar wrote:
> From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> 
> Document support for the Renesas OS Timer (OSTM) found on the Renesas
> RZ/V2N (R9A09G056) SoC. The OSTM IP on RZ/V2N is identical to that on
> other RZ families, so no driver changes are required as `renesas,ostm`
> will be used as fallback compatible.
> 
> Also update the bindings to require the "resets" property for RZ/V2N
> by inverting the logic: all SoCs except RZ/A1 and RZ/A2 now require
> the "resets" property.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

* Re: [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Enable reprobe for all ARM64 SoCs
  2025-05-02 16:09     ` Lad, Prabhakar
@ 2025-05-02 17:36       ` Geert Uytterhoeven
  2025-05-02 21:55         ` Lad, Prabhakar
  0 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2025-05-02 17:36 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maxime Coquelin, Alexandre Torgue,
	Geert Uytterhoeven, Magnus Damm, Chris Brandt, linux-kernel,
	devicetree, linux-stm32, linux-arm-kernel, linux-renesas-soc,
	Biju Das, Fabrizio Castro, Lad 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


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

* Re: [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Enable reprobe for all ARM64 SoCs
  2025-05-02 17:36       ` Geert Uytterhoeven
@ 2025-05-02 21:55         ` Lad, Prabhakar
  0 siblings, 0 replies; 8+ messages in thread
From: Lad, Prabhakar @ 2025-05-02 21:55 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Daniel Lezcano, Thomas Gleixner, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Maxime Coquelin, Alexandre Torgue,
	Geert Uytterhoeven, Magnus Damm, Chris Brandt, linux-kernel,
	devicetree, linux-stm32, linux-arm-kernel, linux-renesas-soc,
	Biju Das, Fabrizio Castro, Lad Prabhakar

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


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

end of thread, other threads:[~2025-05-02 21:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-02 12:46 [PATCH v2 0/2] Add support for Renesas OSTM on RZ/V2N SoC Prabhakar
2025-05-02 12:46 ` [PATCH v2 1/2] dt-bindings: timer: renesas,ostm: Document RZ/V2N (R9A09G056) support Prabhakar
2025-05-02 16:31   ` Conor Dooley
2025-05-02 12:46 ` [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Enable reprobe for all ARM64 SoCs Prabhakar
2025-05-02 14:37   ` Geert Uytterhoeven
2025-05-02 16:09     ` Lad, Prabhakar
2025-05-02 17:36       ` Geert Uytterhoeven
2025-05-02 21:55         ` Lad, Prabhakar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).