[PATCH 08/13] clk: renesas: Convert Gen2/Gen3 clock tables to clk-provider struct clk_div_table

Marek Vasut marek.vasut+renesas at mailbox.org
Thu Jan 26 21:06:02 CET 2023


Replace custom local structure with matching one from clk-provider.h .
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
 drivers/clk/renesas/clk-rcar-gen2.c | 6 +-----
 drivers/clk/renesas/clk-rcar-gen3.c | 8 ++------
 2 files changed, 3 insertions(+), 11 deletions(-)

diff --git a/drivers/clk/renesas/clk-rcar-gen2.c b/drivers/clk/renesas/clk-rcar-gen2.c
index 3a68c5ad0eb..850d6411190 100644
--- a/drivers/clk/renesas/clk-rcar-gen2.c
+++ b/drivers/clk/renesas/clk-rcar-gen2.c
@@ -17,6 +17,7 @@
 #include <log.h>
 #include <asm/global_data.h>
 #include <asm/io.h>
+#include <linux/clk-provider.h>
 
 #include <dt-bindings/clock/renesas-cpg-mssr.h>
 
@@ -26,11 +27,6 @@
 #define CPG_PLL0CR		0x00d8
 #define CPG_SDCKCR		0x0074
 
-struct clk_div_table {
-	u8	val;
-	u8	div;
-};
-
 /* SDHI divisors */
 static const struct clk_div_table cpg_sdh_div_table[] = {
 	{  0,  2 }, {  1,  3 }, {  2,  4 }, {  3,  6 },
diff --git a/drivers/clk/renesas/clk-rcar-gen3.c b/drivers/clk/renesas/clk-rcar-gen3.c
index dd61fe0c7cd..3df6aaabf0f 100644
--- a/drivers/clk/renesas/clk-rcar-gen3.c
+++ b/drivers/clk/renesas/clk-rcar-gen3.c
@@ -21,6 +21,7 @@
 #include <asm/global_data.h>
 #include <asm/io.h>
 #include <linux/bitops.h>
+#include <linux/clk-provider.h>
 #include <reset-uclass.h>
 
 #include <dt-bindings/clock/renesas-cpg-mssr.h>
@@ -55,11 +56,6 @@
 	.div = (sd_div), \
 }
 
-struct sd_div_table {
-	u32 val;
-	unsigned int div;
-};
-
 /* SDn divider
  *                     sd_srcfc   sd_fc   div
  * stp_hck   stp_ck    (div)      (div)     = sd_srcfc x sd_fc
@@ -75,7 +71,7 @@ struct sd_div_table {
  *  1         0         3 (8)      0 (2)     16
  *  1         0         4 (16)     0 (2)     32
  */
-static const struct sd_div_table cpg_sd_div_table[] = {
+static const struct clk_div_table cpg_sd_div_table[] = {
 /*	CPG_SD_DIV_TABLE_DATA(stp_hck,  stp_ck,   sd_srcfc,   sd_fc,  sd_div) */
 	CPG_SD_DIV_TABLE_DATA(0,        0,        0,          1,        4),
 	CPG_SD_DIV_TABLE_DATA(0,        0,        1,          1,        8),
-- 
2.39.0



More information about the U-Boot mailing list