2024-03-22 15:14:14

by Prabhakar

[permalink] [raw]
Subject: [PATCH v2 0/2] Add OSTM support for Renesas RZ/V2H(P) SoC

From: Lad Prabhakar <[email protected]>

Hi,

This patch series aims to add OSTM support for Renesas RZ/V2H(P) SoC.
RZ/V2H(P) SoC has 8 GTM channels.

v1->v2
- Inlcuded Ack/RB tag
- Updated commit description for patch 2/2

v1: https://patchwork.kernel.org/project/linux-renesas-soc/cover/[email protected]/

Cheers,
Prabhakar

Lad Prabhakar (2):
dt-bindings: timer: renesas: ostm: Document Renesas RZ/V2H(P) SoC
clocksource/drivers/renesas-ostm: Allow OSTM driver to reprobe for
RZ/V2H(P) SoC

Documentation/devicetree/bindings/timer/renesas,ostm.yaml | 2 ++
drivers/clocksource/renesas-ostm.c | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)

--
2.34.1



2024-03-22 15:14:22

by Prabhakar

[permalink] [raw]
Subject: [PATCH v2 1/2] dt-bindings: timer: renesas: ostm: Document Renesas RZ/V2H(P) SoC

From: Lad Prabhakar <[email protected]>

Document the General Timer Module (a.k.a OSTM) block on Renesas RZ/V2H(P)
("R9A09G057") SoC, which is identical to the one found on the RZ/A1H and
RZ/G2L SoCs. Add the "renesas,r9a09g057-ostm" compatible string for the
RZ/V2H(P) SoC.

Signed-off-by: Lad Prabhakar <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Acked-by: Conor Dooley <[email protected]>
---
v1->v2
- Included Ack and RB tags
---
Documentation/devicetree/bindings/timer/renesas,ostm.yaml | 2 ++
1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/timer/renesas,ostm.yaml b/Documentation/devicetree/bindings/timer/renesas,ostm.yaml
index 8b06a681764e..e8c642166462 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,r9a09g057-ostm # RZ/V2H(P)
- const: renesas,ostm # Generic

reg:
@@ -58,6 +59,7 @@ if:
- renesas,r9a07g043-ostm
- renesas,r9a07g044-ostm
- renesas,r9a07g054-ostm
+ - renesas,r9a09g057-ostm
then:
required:
- resets
--
2.34.1


2024-03-22 15:14:33

by Prabhakar

[permalink] [raw]
Subject: [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Allow OSTM driver to reprobe for RZ/V2H(P) SoC

From: Lad Prabhakar <[email protected]>

The RZ/V2H(P) (R9A09G057) SoC is equipped with the Generic Timer Module,
also known as OSTM. Similar to the RZ/G2L SoC, the OSTM on the RZ/V2H(P)
SoC requires the reset line to be deasserted before accessing any
registers.

Early call to ostm_init() happens through TIMER_OF_DECLARE() which always
fails with -EPROBE_DEFER, as resets are not available that early in the
boot process. To address this issue on the RZ/V2H(P) SoC, enable the OSTM
driver to be reprobed through the platform driver probe mechanism.

Signed-off-by: Lad Prabhakar <[email protected]>
---
v1->v2
- Updated commit description
- Dropped usage of IS_ENABLED() and used defined() instead
---
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 8da972dc1713..39487d05a009 100644
--- a/drivers/clocksource/renesas-ostm.c
+++ b/drivers/clocksource/renesas-ostm.c
@@ -224,7 +224,7 @@ static int __init ostm_init(struct device_node *np)

TIMER_OF_DECLARE(ostm, "renesas,ostm", ostm_init);

-#ifdef CONFIG_ARCH_RZG2L
+#if defined(CONFIG_ARCH_RZG2L) || defined(CONFIG_ARCH_R9A09G057)
static int __init ostm_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
--
2.34.1


2024-04-17 15:08:10

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH v2 2/2] clocksource/drivers/renesas-ostm: Allow OSTM driver to reprobe for RZ/V2H(P) SoC

On Fri, Mar 22, 2024 at 4:13 PM Prabhakar <[email protected]> wrote:
> From: Lad Prabhakar <[email protected]>
>
> The RZ/V2H(P) (R9A09G057) SoC is equipped with the Generic Timer Module,
> also known as OSTM. Similar to the RZ/G2L SoC, the OSTM on the RZ/V2H(P)
> SoC requires the reset line to be deasserted before accessing any
> registers.
>
> Early call to ostm_init() happens through TIMER_OF_DECLARE() which always
> fails with -EPROBE_DEFER, as resets are not available that early in the
> boot process. To address this issue on the RZ/V2H(P) SoC, enable the OSTM
> driver to be reprobed through the platform driver probe mechanism.
>
> Signed-off-by: Lad Prabhakar <[email protected]>
> ---
> v1->v2
> - Updated commit description
> - Dropped usage of IS_ENABLED() and used defined() instead

Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68korg

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

2024-04-29 23:43:48

by Daniel Lezcano

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] Add OSTM support for Renesas RZ/V2H(P) SoC

On 22/03/2024 16:12, Prabhakar wrote:
> From: Lad Prabhakar <[email protected]>
>
> Hi,
>
> This patch series aims to add OSTM support for Renesas RZ/V2H(P) SoC.
> RZ/V2H(P) SoC has 8 GTM channels.
>
> v1->v2
> - Inlcuded Ack/RB tag
> - Updated commit description for patch 2/2
>
> v1: https://patchwork.kernel.org/project/linux-renesas-soc/cover/[email protected]/

Applied, thanks

--
<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