Skip to contentSkip to conversation

clk: fix link error for rcar-gen2

PATCH In review Arnd Bergmann 4 participants 11 messages Oct 21, 2016 – Nov 2, 2016

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: fix link error for rcar-gen2

The addition of one more rcar-gen2 based SoC caused a build error (again) in my randconfig builds:

arch/arm/mach-shmobile/setup-rcar-gen2.o: In function `rcar_gen2_timer_init':
setup-rcar-gen2.c:(.init.text+0x200): undefined reference to `rcar_gen2_clocks_init'

I think this has happened twice in the past. Instead of adding each SoC one at a time, this changes the existing list to always build the rcar-gen2 related clk files whenever the generic symbol is selected.

Fixes 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")
---
 drivers/clk/renesas/Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/clk/renesas/Makefile +1 -5
index 90dd0db7d9c6..762d122eddec 100644
@@ -4,11 +4,7 @@ obj-$(CONFIG_ARCH_R8A73A4)		+= clk-r8a73a4.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7740)		+= clk-r8a7740.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7778)		+= clk-r8a7778.o
 obj-$(CONFIG_ARCH_R8A7779)		+= clk-r8a7779.o
-obj-$(CONFIG_ARCH_R8A7790)		+= clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7791)		+= clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7792)		+= clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7793)		+= clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7794)		+= clk-rcar-gen2.o clk-div6.o
+obj-$(CONFIG_ARCH_RCAR_GEN2)		+= clk-rcar-gen2.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7795)		+= r8a7795-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_R8A7796)		+= r8a7796-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_SH73A0)		+= clk-sh73a0.o clk-div6.o
Signature · 1 line
2.9.0
#1 lore raw

Hello.

Quoted 5 lines · Arnd Bergmann

The addition of one more rcar-gen2 based SoC caused a build error (again) in my randconfig builds:

arch/arm/mach-shmobile/setup-rcar-gen2.o: In function `rcar_gen2_timer_init':
setup-rcar-gen2.c:(.init.text+0x200): undefined reference to `rcar_gen2_clocks_init'

OK, seeing how you got this -- I should have tested the kernel build with
only R8A7743 enabled... sorry about that. :-<
I probably shouldn't have used rcar_gen2_timer_init() in the 1st place...

Quoted 3 lines

I think this has happened twice in the past. Instead of adding each SoC one at a time, this changes the existing list to always build the rcar-gen2 related clk files whenever the generic symbol is selected.

The problem is we're not going to use this driver on RZ/G SoCs... The
newer rcar2-cpg-mssr.c will be used instead -- I submitted the patches for that before ELC-E...

Quoted 2 lines
Fixes 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")

[...]

MBR, Sergei

#2 lore raw
In reply to Arnd Bergmann

Hi Arnd,

Quoted 9 lines · Arnd Bergmann

The addition of one more rcar-gen2 based SoC caused a build error (again) in my randconfig builds:

arch/arm/mach-shmobile/setup-rcar-gen2.o: In function `rcar_gen2_timer_init':
setup-rcar-gen2.c:(.init.text+0x200): undefined reference to `rcar_gen2_clocks_init'

I think this has happened twice in the past. Instead of adding each SoC one at a time, this changes the existing list to always build the rcar-gen2 related clk files whenever the generic symbol is selected.

The problem is that the R-Car Gen2 platform code calls into the R-Car Gen2 clock driver[*]. RZ/G1M (r8a7743) uses the R-Car Gen2 core, but not the R-Car Gen2 clock driver.
Instead it will use the modern CPG/MSSR driver, like R-Car Gen3 does.

[*] That will be fixed by "[PATCH v4 00/23] soc: renesas: Add R-Car RST
driver for obtaining mode pin state".

Quoted 13 lines
Fixes 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")
---
 drivers/clk/renesas/Makefile | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/clk/renesas/Makefile +0 -0
index 90dd0db7d9c6..762d122eddec 100644
@@ -4,11 +4,7 @@ obj-$(CONFIG_ARCH_R8A73A4)             += clk-r8a73a4.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7740)             += clk-r8a7740.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7778)             += clk-r8a7778.o

drivers/clk/renesas/Makefile obj-$(CONFIG_ARCH_R8A73A4) += clk-r8a73a4.o clk-div6.o · line 10

Quoted 10 lines
drivers/clk/renesas/Makefile +1 -5
 obj-$(CONFIG_ARCH_R8A7779)             += clk-r8a7779.o
-obj-$(CONFIG_ARCH_R8A7790)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7791)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7792)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7793)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7794)             += clk-rcar-gen2.o clk-div6.o
+obj-$(CONFIG_ARCH_RCAR_GEN2)           += clk-rcar-gen2.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7795)             += r8a7795-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_R8A7796)             += r8a7796-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_SH73A0)              += clk-sh73a0.o clk-div6.o

Please don't fix it this way, as it will make it _harder_ to convert the R-Car Gen2 SoCs to the modern CPG/MSSR driver later.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

#3 lore raw
Quoted 12 lines · CEST Geert Uytterhoeven
Quoted 12 lines
drivers/clk/renesas/Makefile +0 -4
index 90dd0db7d9c6..762d122eddec 100644
@@ -4,11 +4,7 @@ obj-$(CONFIG_ARCH_R8A73A4)             += clk-r8a73a4.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7740)             += clk-r8a7740.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7778)             += clk-r8a7778.o
 obj-$(CONFIG_ARCH_R8A7779)             += clk-r8a7779.o
-obj-$(CONFIG_ARCH_R8A7790)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7791)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7792)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7793)             += clk-rcar-gen2.o clk-div6.o
Quoted 9 lines

drivers/clk/renesas/Makefile obj-$(CONFIG_ARCH_R8A73A4) += clk-r8a73a4.o clk-div6.o · line 10

Quoted 5 lines
drivers/clk/renesas/Makefile +1 -1
-obj-$(CONFIG_ARCH_R8A7794)             += clk-rcar-gen2.o clk-div6.o
+obj-$(CONFIG_ARCH_RCAR_GEN2)           += clk-rcar-gen2.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7795)             += r8a7795-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_R8A7796)             += r8a7796-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_SH73A0)              += clk-sh73a0.o clk-div6.o

Please don't fix it this way, as it will make it _harder_ to convert the R-Car Gen2 SoCs to the modern CPG/MSSR driver later.

Ok, I see. How about just adding another line for r8a7743 and dropping that again after the timer_init has been converted?

Arnd

#4 lore raw

Hi Arnd,

Quoted 22 lines · Arnd Bergmann
Quoted 12 lines · CEST Geert Uytterhoeven
Quoted 12 lines
drivers/clk/renesas/Makefile +0 -4
index 90dd0db7d9c6..762d122eddec 100644
@@ -4,11 +4,7 @@ obj-$(CONFIG_ARCH_R8A73A4)             += clk-r8a73a4.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7740)             += clk-r8a7740.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7778)             += clk-r8a7778.o
 obj-$(CONFIG_ARCH_R8A7779)             += clk-r8a7779.o
-obj-$(CONFIG_ARCH_R8A7790)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7791)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7792)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7793)             += clk-rcar-gen2.o clk-div6.o
Quoted 8 lines

drivers/clk/renesas/Makefile obj-$(CONFIG_ARCH_R8A73A4) += clk-r8a73a4.o clk-div6.o · line 10

Quoted 5 lines
drivers/clk/renesas/Makefile +1 -1
-obj-$(CONFIG_ARCH_R8A7794)             += clk-rcar-gen2.o clk-div6.o
+obj-$(CONFIG_ARCH_RCAR_GEN2)           += clk-rcar-gen2.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7795)             += r8a7795-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_R8A7796)             += r8a7796-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_SH73A0)              += clk-sh73a0.o clk-div6.o

Please don't fix it this way, as it will make it _harder_ to convert the R-Car Gen2 SoCs to the modern CPG/MSSR driver later.

Quoted 2 lines

Ok, I see. How about just adding another line for r8a7743 and dropping that again after the timer_init has been converted?

That's an option, but it touches a different subsystem ;-)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

#5 lore raw
Quoted 23 lines · Geert Uytterhoeven
Quoted 22 lines · Arnd Bergmann
Quoted 20 lines · CEST Geert Uytterhoeven
Quoted 7 lines
drivers/clk/renesas/Makefile +0 -0
index 90dd0db7d9c6..762d122eddec 100644
@@ -4,11 +4,7 @@ obj-$(CONFIG_ARCH_R8A73A4)             += clk-r8a73a4.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7740)             += clk-r8a7740.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7778)             += clk-r8a7778.o

drivers/clk/renesas/Makefile obj-$(CONFIG_ARCH_R8A73A4) += clk-r8a73a4.o clk-div6.o · line 10

Quoted 10 lines
drivers/clk/renesas/Makefile +1 -5
 obj-$(CONFIG_ARCH_R8A7779)             += clk-r8a7779.o
-obj-$(CONFIG_ARCH_R8A7790)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7791)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7792)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7793)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7794)             += clk-rcar-gen2.o clk-div6.o
+obj-$(CONFIG_ARCH_RCAR_GEN2)           += clk-rcar-gen2.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7795)             += r8a7795-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_R8A7796)             += r8a7796-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_SH73A0)              += clk-sh73a0.o clk-div6.o

Please don't fix it this way, as it will make it _harder_ to convert the R-Car Gen2 SoCs to the modern CPG/MSSR driver later.

Quoted 4 lines
Quoted 2 lines

Ok, I see. How about just adding another line for r8a7743 and dropping that again after the timer_init has been converted?

That's an option, but it touches a different subsystem ;-)

Alternatively, the call to rcar_gen2_clocks_init() in arch/arm/mach-shmobile/setup-rcar-gen2.c:rcar_gen2_timer_init() can be protected temporarily by

    #if defined(CONFIG_R8A7790) || ... || defined(CONFIG_R8A7794)

until "[PATCH v4 00/23] soc: renesas: Add R-Car RST driver for obtaining mode pin state" went it, which will remove that call.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

#6 lore raw
Quoted 30 lines · Geert Uytterhoeven
Quoted 23 lines · Geert Uytterhoeven
Quoted 22 lines · Arnd Bergmann
Quoted 20 lines · CEST Geert Uytterhoeven
Quoted 7 lines
drivers/clk/renesas/Makefile +0 -0
index 90dd0db7d9c6..762d122eddec 100644
@@ -4,11 +4,7 @@ obj-$(CONFIG_ARCH_R8A73A4)             += clk-r8a73a4.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7740)             += clk-r8a7740.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7778)             += clk-r8a7778.o

drivers/clk/renesas/Makefile obj-$(CONFIG_ARCH_R8A73A4) += clk-r8a73a4.o clk-div6.o · line 10

Quoted 10 lines
drivers/clk/renesas/Makefile +1 -5
 obj-$(CONFIG_ARCH_R8A7779)             += clk-r8a7779.o
-obj-$(CONFIG_ARCH_R8A7790)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7791)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7792)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7793)             += clk-rcar-gen2.o clk-div6.o
-obj-$(CONFIG_ARCH_R8A7794)             += clk-rcar-gen2.o clk-div6.o
+obj-$(CONFIG_ARCH_RCAR_GEN2)           += clk-rcar-gen2.o clk-div6.o
 obj-$(CONFIG_ARCH_R8A7795)             += r8a7795-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_R8A7796)             += r8a7796-cpg-mssr.o rcar-gen3-cpg.o
 obj-$(CONFIG_ARCH_SH73A0)              += clk-sh73a0.o clk-div6.o

Please don't fix it this way, as it will make it _harder_ to convert the R-Car Gen2 SoCs to the modern CPG/MSSR driver later.

Quoted 4 lines
Quoted 2 lines

Ok, I see. How about just adding another line for r8a7743 and dropping that again after the timer_init has been converted?

That's an option, but it touches a different subsystem ;-)

Quoted 8 lines

Alternatively, the call to rcar_gen2_clocks_init() in arch/arm/mach-shmobile/setup-rcar-gen2.c:rcar_gen2_timer_init() can be protected temporarily by

    #if defined(CONFIG_R8A7790) || ... || defined(CONFIG_R8A7794)

until "[PATCH v4 00/23] soc: renesas: Add R-Car RST driver for obtaining mode pin state" went it, which will remove that call.

I believe Geert has something like the following in mind. It makes sense to me as it should resolve the problem in question and although it is a work-around it should not be in place for long as the patchset mentioned immediately above would remove it.

From: Simon Horman <[email protected]>
Subject: [PATCH] ARM: shmobile: only call rcar_gen2_clocks_init() if present

The RZ/G1M (r8a7743) uses the R-Car Gen2 core, but not the R-Car Gen2 clock driver. This is a harbinger of a transition for R-Car Gen2 SoCs. As the process to get all the required pieces in place is somewhat complex it seems useful to try to disentangle dependencies where possible.

The approach here is to temporarily disable calling rcar_gen2_clocks_init() if no R-Car Gen2 SoC are configured and thus the symbol will not be present.

Fixes 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")

---

The current likely path to removing need for this is for "[PATCH v4 00/23] soc: renesas: Add R-Car RST driver for obtaining mode pin state" to be accepted. In particular patch 20 removes the call to rcar_gen2_clocks_init() in rcar_gen2_timer_init().

---
 arch/arm/mach-shmobile/setup-rcar-gen2.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/setup-rcar-gen2.c +7 -1
index 875bcb8c1026..657262556dc4 100644
@@ -131,7 +131,13 @@ void __init rcar_gen2_timer_init(void)
 	iounmap(base);
 #endif /* CONFIG_ARM_ARCH_TIMER */
 
-	rcar_gen2_clocks_init(mode);
+	if (IS_ENABLED(CONFIG_ARCH_R8A7790) ||
+	    IS_ENABLED(CONFIG_ARCH_R8A7791) ||
+	    IS_ENABLED(CONFIG_ARCH_R8A7792) ||
+	    IS_ENABLED(CONFIG_ARCH_R8A7793) ||
+	    IS_ENABLED(CONFIG_ARCH_R8A7794))
+		rcar_gen2_clocks_init(mode);
+
 	clocksource_probe();
 }
 
Signature · 1 line
2.7.0.rc3.207.g0ac5344
#7 lore raw
Quoted 10 lines · Simon Horman

From: Simon Horman <[email protected]>
Subject: [PATCH] ARM: shmobile: only call rcar_gen2_clocks_init() if present

The RZ/G1M (r8a7743) uses the R-Car Gen2 core, but not the R-Car Gen2 clock driver. This is a harbinger of a transition for R-Car Gen2 SoCs. As the process to get all the required pieces in place is somewhat complex it seems useful to try to disentangle dependencies where possible.

The approach here is to temporarily disable calling rcar_gen2_clocks_init() if no R-Car Gen2 SoC are configured and thus the symbol will not be

SoCs

Quoted 4 lines

present.

Fixes 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

#8 lore raw
Quoted 12 lines · Geert Uytterhoeven
Quoted 10 lines · Simon Horman

From: Simon Horman <[email protected]>
Subject: [PATCH] ARM: shmobile: only call rcar_gen2_clocks_init() if present

The RZ/G1M (r8a7743) uses the R-Car Gen2 core, but not the R-Car Gen2 clock driver. This is a harbinger of a transition for R-Car Gen2 SoCs. As the process to get all the required pieces in place is somewhat complex it seems useful to try to disentangle dependencies where possible.

The approach here is to temporarily disable calling rcar_gen2_clocks_init() if no R-Car Gen2 SoC are configured and thus the symbol will not be

Quoted 8 lines

SoCs

Quoted 4 lines

present.

Fixes 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")

Thanks, I will queue this up.

#9 lore raw
In reply to Simon Horman

Hi Simon,

Quoted 29 lines · Simon Horman

From: Simon Horman <[email protected]>
Subject: [PATCH] ARM: shmobile: only call rcar_gen2_clocks_init() if present

The RZ/G1M (r8a7743) uses the R-Car Gen2 core, but not the R-Car Gen2 clock driver. This is a harbinger of a transition for R-Car Gen2 SoCs. As the process to get all the required pieces in place is somewhat complex it seems useful to try to disentangle dependencies where possible.

The approach here is to temporarily disable calling rcar_gen2_clocks_init() if no R-Car Gen2 SoC are configured and thus the symbol will not be present.

Fixes 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")

---

The current likely path to removing need for this is for "[PATCH v4 00/23] soc: renesas: Add R-Car RST driver for obtaining mode pin state" to be accepted. In particular patch 20 removes the call to rcar_gen2_clocks_init() in rcar_gen2_timer_init().

---
 arch/arm/mach-shmobile/setup-rcar-gen2.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -0
index 875bcb8c1026..657262556dc4 100644

arch/arm/mach-shmobile/setup-rcar-gen2.c void __init rcar_gen2_timer_init(void) · line 139

Quoted 10 lines
arch/arm/mach-shmobile/setup-rcar-gen2.c +6 -1
@@ -131,7 +131,13 @@ void __init rcar_gen2_timer_init(void)
        iounmap(base);
 #endif /* CONFIG_ARM_ARCH_TIMER */
 
-       rcar_gen2_clocks_init(mode);
+       if (IS_ENABLED(CONFIG_ARCH_R8A7790) ||
+           IS_ENABLED(CONFIG_ARCH_R8A7791) ||
+           IS_ENABLED(CONFIG_ARCH_R8A7792) ||
+           IS_ENABLED(CONFIG_ARCH_R8A7793) ||
+           IS_ENABLED(CONFIG_ARCH_R8A7794))
+               rcar_gen2_clocks_init(mode);

Upon second thought (triggered bySergei conflict notification), this needs an else clause:

        else
                of_clk_init(NULL);

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

#10 lore raw
Quoted 46 lines · Geert Uytterhoeven

Hi Simon,

Quoted 29 lines · Simon Horman

From: Simon Horman <[email protected]>
Subject: [PATCH] ARM: shmobile: only call rcar_gen2_clocks_init() if present

The RZ/G1M (r8a7743) uses the R-Car Gen2 core, but not the R-Car Gen2 clock driver. This is a harbinger of a transition for R-Car Gen2 SoCs. As the process to get all the required pieces in place is somewhat complex it seems useful to try to disentangle dependencies where possible.

The approach here is to temporarily disable calling rcar_gen2_clocks_init() if no R-Car Gen2 SoC are configured and thus the symbol will not be present.

Fixes 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support")

---

The current likely path to removing need for this is for "[PATCH v4 00/23] soc: renesas: Add R-Car RST driver for obtaining mode pin state" to be accepted. In particular patch 20 removes the call to rcar_gen2_clocks_init() in rcar_gen2_timer_init().

---
 arch/arm/mach-shmobile/setup-rcar-gen2.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/setup-rcar-gen2.c +0 -0
index 875bcb8c1026..657262556dc4 100644

arch/arm/mach-shmobile/setup-rcar-gen2.c void __init rcar_gen2_timer_init(void) · line 139

Quoted 10 lines
arch/arm/mach-shmobile/setup-rcar-gen2.c +6 -1
@@ -131,7 +131,13 @@ void __init rcar_gen2_timer_init(void)
        iounmap(base);
 #endif /* CONFIG_ARM_ARCH_TIMER */
 
-       rcar_gen2_clocks_init(mode);
+       if (IS_ENABLED(CONFIG_ARCH_R8A7790) ||
+           IS_ENABLED(CONFIG_ARCH_R8A7791) ||
+           IS_ENABLED(CONFIG_ARCH_R8A7792) ||
+           IS_ENABLED(CONFIG_ARCH_R8A7793) ||
+           IS_ENABLED(CONFIG_ARCH_R8A7794))
+               rcar_gen2_clocks_init(mode);

Upon second thought (triggered bySergei conflict notification), this needs an else clause:

Quoted 2 lines
        else
                of_clk_init(NULL);

Thanks, I will add that.