[PATCH v5 02/10] clk: renesas: prepare for non R-Car clock drivers

2023-05-12 Thread Ralph Siemsen
Add new CONFIG_CLK_RCAR to control compilation of shared code for R-Car
clock drivers (renesas-cpg-mssr.c). Enable this for R-Car Gen2 and 3.

This is necessary so that CONFIG_CLK_RENESAS can be enabled, allowing
recursion into the drivers/clk/reneasas directory, without bringing in
the R-Car support code. The support code contains platform specific
access (TMU_BASE) which is not needed on other Renesas devices such as
RZ/N1.

Signed-off-by: Ralph Siemsen 
Reviewed-by: Sean Anderson 
Reviewed-by: Marek Vasut 
---

(no changes since v5)

Changes in v5:
- add symbol CONFIG_CLK_RCAR and select it for R-Car Gen2/3.
- use this to control compilation of renesas-cpg-mssr.c, rather
  than CONFIG_CLK_RENESAS which also controls directory recursion.
- update the commit message accordingly

Changes in v3:
- added tags

 drivers/clk/renesas/Kconfig  | 9 -
 drivers/clk/renesas/Makefile | 2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/renesas/Kconfig b/drivers/clk/renesas/Kconfig
index 45671c6925..bdb81a1bbe 100644
--- a/drivers/clk/renesas/Kconfig
+++ b/drivers/clk/renesas/Kconfig
@@ -2,7 +2,12 @@ config CLK_RENESAS
bool "Renesas clock drivers"
depends on CLK && ARCH_RMOBILE
help
- Enable support for clock present on Renesas RCar SoCs.
+ Enable support for clock present on Renesas SoCs.
+
+config CLK_RCAR
+   bool "Renesas RCar clock driver support"
+   help
+ Enable common code for clocks on Renesas RCar SoCs.
 
 config CLK_RCAR_CPG_LIB
bool "CPG/MSSR library functions"
@@ -11,6 +16,7 @@ config CLK_RCAR_GEN2
bool "Renesas RCar Gen2 clock driver"
def_bool y if RCAR_32
depends on CLK_RENESAS
+   select CLK_RCAR
help
  Enable this to support the clocks on Renesas RCar Gen2 SoC.
 
@@ -48,6 +54,7 @@ config CLK_RCAR_GEN3
bool "Renesas RCar Gen3 and Gen4 clock driver"
def_bool y if RCAR_64
depends on CLK_RENESAS
+   select CLK_RCAR
select CLK_RCAR_CPG_LIB
select DM_RESET
help
diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile
index fe0391e520..c95dee67f3 100644
--- a/drivers/clk/renesas/Makefile
+++ b/drivers/clk/renesas/Makefile
@@ -1,4 +1,4 @@
-obj-$(CONFIG_CLK_RENESAS) += renesas-cpg-mssr.o
+obj-$(CONFIG_CLK_RCAR) += 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_R8A774A1) += r8a774a1-cpg-mssr.o
-- 
2.25.1



Re: [PATCH v5 02/10] clk: renesas: prepare for non R-Car clock drivers

2023-05-07 Thread Marek Vasut

On 4/24/23 03:15, Ralph Siemsen wrote:

Add new CONFIG_CLK_RCAR to control compilation of shared code for R-Car
clock drivers (renesas-cpg-mssr.c). Enable this for R-Car Gen2 and 3.

This is necessary so that CONFIG_CLK_RENESAS can be enabled, allowing
recursion into the drivers/clk/reneasas directory, without bringing in
the R-Car support code. The support code contains platform specific
access (TMU_BASE) which is not needed on other Renesas devices such as
RZ/N1.

Signed-off-by: Ralph Siemsen 
Reviewed-by: Sean Anderson 


Reviewed-by: Marek Vasut 


[PATCH v5 02/10] clk: renesas: prepare for non R-Car clock drivers

2023-04-23 Thread Ralph Siemsen
Add new CONFIG_CLK_RCAR to control compilation of shared code for R-Car
clock drivers (renesas-cpg-mssr.c). Enable this for R-Car Gen2 and 3.

This is necessary so that CONFIG_CLK_RENESAS can be enabled, allowing
recursion into the drivers/clk/reneasas directory, without bringing in
the R-Car support code. The support code contains platform specific
access (TMU_BASE) which is not needed on other Renesas devices such as
RZ/N1.

Signed-off-by: Ralph Siemsen 
Reviewed-by: Sean Anderson 
---

Changes in v5:
- add symbol CONFIG_CLK_RCAR and select it for R-Car Gen2/3.
- use this to control compilation of renesas-cpg-mssr.c, rather
  than CONFIG_CLK_RENESAS which also controls directory recursion.
- update the commit message accordingly

Changes in v3:
- added tags

 drivers/clk/renesas/Kconfig  | 9 -
 drivers/clk/renesas/Makefile | 2 +-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/renesas/Kconfig b/drivers/clk/renesas/Kconfig
index 45671c6925..bdb81a1bbe 100644
--- a/drivers/clk/renesas/Kconfig
+++ b/drivers/clk/renesas/Kconfig
@@ -2,7 +2,12 @@ config CLK_RENESAS
bool "Renesas clock drivers"
depends on CLK && ARCH_RMOBILE
help
- Enable support for clock present on Renesas RCar SoCs.
+ Enable support for clock present on Renesas SoCs.
+
+config CLK_RCAR
+   bool "Renesas RCar clock driver support"
+   help
+ Enable common code for clocks on Renesas RCar SoCs.
 
 config CLK_RCAR_CPG_LIB
bool "CPG/MSSR library functions"
@@ -11,6 +16,7 @@ config CLK_RCAR_GEN2
bool "Renesas RCar Gen2 clock driver"
def_bool y if RCAR_32
depends on CLK_RENESAS
+   select CLK_RCAR
help
  Enable this to support the clocks on Renesas RCar Gen2 SoC.
 
@@ -48,6 +54,7 @@ config CLK_RCAR_GEN3
bool "Renesas RCar Gen3 and Gen4 clock driver"
def_bool y if RCAR_64
depends on CLK_RENESAS
+   select CLK_RCAR
select CLK_RCAR_CPG_LIB
select DM_RESET
help
diff --git a/drivers/clk/renesas/Makefile b/drivers/clk/renesas/Makefile
index fe0391e520..c95dee67f3 100644
--- a/drivers/clk/renesas/Makefile
+++ b/drivers/clk/renesas/Makefile
@@ -1,4 +1,4 @@
-obj-$(CONFIG_CLK_RENESAS) += renesas-cpg-mssr.o
+obj-$(CONFIG_CLK_RCAR) += 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_R8A774A1) += r8a774a1-cpg-mssr.o
-- 
2.25.1