Message ID | 20161031095214.GA2335@verge.net.au (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | Stephen Boyd |
Headers | show |
On Mon, Oct 31, 2016 at 10:52 AM, Simon Horman <horms@verge.net.au> wrote: > From: Simon Horman <horms+renesas@verge.net.au> > 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 > present. > > Fixes: 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support") > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> 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 -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Mon, Oct 31, 2016 at 11:02:36AM +0100, Geert Uytterhoeven wrote: > On Mon, Oct 31, 2016 at 10:52 AM, Simon Horman <horms@verge.net.au> wrote: > > From: Simon Horman <horms+renesas@verge.net.au> > > 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 > > > present. > > > > Fixes: 1254f607fc3d ("ARM: shmobile: r8a7743: basic SoC support") > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > > Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Thanks, I will queue this up. -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Simon, On Mon, Oct 31, 2016 at 10:52 AM, Simon Horman <horms@verge.net.au> wrote: > From: Simon Horman <horms+renesas@verge.net.au> > 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") > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > --- > > 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(-) > > diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c > index 875bcb8c1026..657262556dc4 100644 > --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c > +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c > @@ -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 -- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wed, Nov 02, 2016 at 09:14:02AM +0100, Geert Uytterhoeven wrote: > Hi Simon, > > On Mon, Oct 31, 2016 at 10:52 AM, Simon Horman <horms@verge.net.au> wrote: > > From: Simon Horman <horms+renesas@verge.net.au> > > 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") > > Signed-off-by: Simon Horman <horms+renesas@verge.net.au> > > --- > > > > 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(-) > > > > diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c > > index 875bcb8c1026..657262556dc4 100644 > > --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c > > +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c > > @@ -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); Thanks, I will add that. -- To unsubscribe from this list: send the line "unsubscribe linux-clk" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c index 875bcb8c1026..657262556dc4 100644 --- a/arch/arm/mach-shmobile/setup-rcar-gen2.c +++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c @@ -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(); }