2024-03-22 15:14:14

by Lad, 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 Lad, 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 Lad, 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


Subject: [tip: timers/core] dt-bindings: timer: renesas: ostm: Document Renesas RZ/V2H(P) SoC

The following commit has been merged into the timers/core branch of tip:

Commit-ID: 6402eb802deb312e33c24699f68fb7775b2c7386
Gitweb: https://git.kernel.org/tip/6402eb802deb312e33c24699f68fb7775b2c7386
Author: Lad Prabhakar <[email protected]>
AuthorDate: Fri, 22 Mar 2024 15:12:18
Committer: Daniel Lezcano <[email protected]>
CommitterDate: Fri, 10 May 2024 10:41:52 +02:00

dt-bindings: timer: renesas: ostm: Document Renesas RZ/V2H(P) SoC

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]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
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 8b06a68..e8c6421 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

Subject: [tip: timers/core] clocksource/drivers/renesas-ostm: Allow OSTM driver to reprobe for RZ/V2H(P) SoC

The following commit has been merged into the timers/core branch of tip:

Commit-ID: 0f63c95aebf11d87b166a5dfd389957c67fef9c0
Gitweb: https://git.kernel.org/tip/0f63c95aebf11d87b166a5dfd389957c67fef9c0
Author: Lad Prabhakar <[email protected]>
AuthorDate: Fri, 22 Mar 2024 15:12:19
Committer: Daniel Lezcano <[email protected]>
CommitterDate: Fri, 10 May 2024 10:41:52 +02:00

clocksource/drivers/renesas-ostm: Allow OSTM driver to reprobe for RZ/V2H(P) SoC

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]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
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 8da972d..39487d0 100644
--- a/drivers/clocksource/renesas-ostm.c
+++ b/drivers/clocksource/renesas-ostm.c
@@ -224,7 +224,7 @@ err_free:

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;