]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
clk: renesas: Convert Gen2/Gen3 clock tables to clk-provider struct clk_div_table
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Thu, 26 Jan 2023 20:06:02 +0000 (21:06 +0100)
committerMarek Vasut <marek.vasut+renesas@gmail.com>
Thu, 2 Feb 2023 00:49:20 +0000 (01:49 +0100)
Replace custom local structure with matching one from clk-provider.h .
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
drivers/clk/renesas/clk-rcar-gen2.c
drivers/clk/renesas/clk-rcar-gen3.c

index 3a68c5ad0eb9ba987823a5ad3831e18f9e377703..850d64111904da8d6cf14e419689d997eded03ac 100644 (file)
@@ -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>
 
 #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 },
index dd61fe0c7cd9fe1dd2e1e44524a9eb6dc4da9f12..3df6aaabf0f2b506a2c37e50a6b8cc316b3d36ff 100644 (file)
@@ -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>
        .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),