Re: [PATCH v4 02/10] clk: renesas: prepare for non-RCAR clock drivers
On 4/17/23 22:48, Ralph Siemsen wrote: On Mon, Apr 17, 2023 at 10:33:18PM +0200, Marek Vasut wrote: On 4/17/23 20:22, Ralph Siemsen wrote: Perhaps we could change Kconfig to select CPG also for gen2. I can make this patch, but how to test that this does not introduce any new problems? Might there be an autobuilder for R-Car somewhere? You could introduce CONFIG_CLK_RCAR Kconfig symbol and use that for renesas-cpg-mssr.o . Would that work ? I can certainly make the patch, and hopefully also do at least a compile-test. Though I will need to figure out which defconfigs I need to test... Try 'grep RENESAS configs/*' , that should give you a decent list.
Re: [PATCH v4 02/10] clk: renesas: prepare for non-RCAR clock drivers
On Mon, Apr 17, 2023 at 10:33:18PM +0200, Marek Vasut wrote: On 4/17/23 20:22, Ralph Siemsen wrote: Perhaps we could change Kconfig to select CPG also for gen2. I can make this patch, but how to test that this does not introduce any new problems? Might there be an autobuilder for R-Car somewhere? You could introduce CONFIG_CLK_RCAR Kconfig symbol and use that for renesas-cpg-mssr.o . Would that work ? I can certainly make the patch, and hopefully also do at least a compile-test. Though I will need to figure out which defconfigs I need to test... Ralph
Re: [PATCH v4 02/10] clk: renesas: prepare for non-RCAR clock drivers
On 4/17/23 20:22, Ralph Siemsen wrote: Hi Marek, On Mon, Apr 17, 2023 at 07:02:34PM +0200, Marek Vasut wrote: On 3/8/23 21:26, Ralph Siemsen wrote: diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile index 8f82a7aa3e..a0d8c10bdb 100644 --- a/drivers/clk/renesas/Makefile +++ b/drivers/clk/renesas/Makefile @@ -1,6 +1,5 @@ -obj-$(CONFIG_CLK_RENESAS) += renesas-cpg-mssr.o obj-$(CONFIG_CLK_RCAR_CPG_LIB) += rcar-cpg-lib.o -obj-$(CONFIG_CLK_RCAR_GEN2) += clk-rcar-gen2.o +obj-$(CONFIG_CLK_RCAR_GEN2) += clk-rcar-gen2.o renesas-cpg-mssr.o Why not move the renesas-cpg-mssr.o into obj-$(CONFIG_CLK_RCAR_CPG_LIB) line instead ? I think this would break the build for gen2 devices, because they make calls to CPG functions (eg. renesas_clk_endisable from clk-rcar-gen2.c), however Kconfig only selects CPG lib for gen3. Good point Perhaps we could change Kconfig to select CPG also for gen2. I can make this patch, but how to test that this does not introduce any new problems? Might there be an autobuilder for R-Car somewhere? You could introduce CONFIG_CLK_RCAR Kconfig symbol and use that for renesas-cpg-mssr.o . Would that work ?
Re: [PATCH v4 02/10] clk: renesas: prepare for non-RCAR clock drivers
Hi Marek, On Mon, Apr 17, 2023 at 07:02:34PM +0200, Marek Vasut wrote: On 3/8/23 21:26, Ralph Siemsen wrote: diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile index 8f82a7aa3e..a0d8c10bdb 100644 --- a/drivers/clk/renesas/Makefile +++ b/drivers/clk/renesas/Makefile @@ -1,6 +1,5 @@ -obj-$(CONFIG_CLK_RENESAS) += renesas-cpg-mssr.o obj-$(CONFIG_CLK_RCAR_CPG_LIB) += rcar-cpg-lib.o -obj-$(CONFIG_CLK_RCAR_GEN2) += clk-rcar-gen2.o +obj-$(CONFIG_CLK_RCAR_GEN2) += clk-rcar-gen2.o renesas-cpg-mssr.o Why not move the renesas-cpg-mssr.o into obj-$(CONFIG_CLK_RCAR_CPG_LIB) line instead ? I think this would break the build for gen2 devices, because they make calls to CPG functions (eg. renesas_clk_endisable from clk-rcar-gen2.c), however Kconfig only selects CPG lib for gen3. Perhaps we could change Kconfig to select CPG also for gen2. I can make this patch, but how to test that this does not introduce any new problems? Might there be an autobuilder for R-Car somewhere? I suspect RZN1 is not using the CPG lib anyway ? You are correct, RZN1 does not use the CPG lib. Regards Ralph
Re: [PATCH v4 02/10] clk: renesas: prepare for non-RCAR clock drivers
On 3/8/23 21:26, Ralph Siemsen wrote: Allow CONFIG_CLK_RENESAS to be set without bringing in RCAR-GEN2/3 code. CONFIG_RENESAS is used in drivers/clk/Makefile to control recursion into the drivers/clk/renesas subdirectory. It also controls compilation of renesas-cpg-mssr.c support code for the RCAR-GEN2 and RCAR-GEN3 devices. The support code contains platform specific hardware access (TMU_BASE), and it is not needed for other Renesas devices such as RZ/N1. Therefore, alter Makefile to build renesas-cpg-mssr.c only for RCAR-GEN2/3. Signed-off-by: Ralph Siemsen Reviewed-by: Sean Anderson --- (no changes since v3) Changes in v3: - added tags drivers/clk/renesas/Kconfig | 2 +- drivers/clk/renesas/Makefile | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/clk/renesas/Kconfig b/drivers/clk/renesas/Kconfig index 1686410d6d..6788415eed 100644 --- a/drivers/clk/renesas/Kconfig +++ b/drivers/clk/renesas/Kconfig @@ -1,6 +1,6 @@ config CLK_RENESAS bool "Renesas clock drivers" - depends on CLK && ARCH_RMOBILE + depends on CLK && (ARCH_RMOBILE || ARCH_RZN1) help Enable support for clock present on Renesas RCar SoCs. diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile index 8f82a7aa3e..a0d8c10bdb 100644 --- a/drivers/clk/renesas/Makefile +++ b/drivers/clk/renesas/Makefile @@ -1,6 +1,5 @@ -obj-$(CONFIG_CLK_RENESAS) += renesas-cpg-mssr.o obj-$(CONFIG_CLK_RCAR_CPG_LIB) += rcar-cpg-lib.o -obj-$(CONFIG_CLK_RCAR_GEN2) += clk-rcar-gen2.o +obj-$(CONFIG_CLK_RCAR_GEN2) += clk-rcar-gen2.o renesas-cpg-mssr.o Why not move the renesas-cpg-mssr.o into obj-$(CONFIG_CLK_RCAR_CPG_LIB) line instead ? I suspect RZN1 is not using the CPG lib anyway ?