clk: pxa1928: Move number of clocks to driver source
authorDuje Mihanović <duje.mihanovic@skole.hr>
Sat, 12 Aug 2023 10:02:58 +0000 (12:02 +0200)
committerStephen Boyd <sboyd@kernel.org>
Tue, 22 Aug 2023 21:14:14 +0000 (14:14 -0700)
The number of clocks should not be in the dt binding as it is not used
by the respective device tree and thus needlessly bloats the ABI.

Move this number of clocks into the driver source.

Signed-off-by: Duje Mihanović <duje.mihanovic@skole.hr>
Link: https://lore.kernel.org/r/20230812-mmp-nr-clks-v2-3-f9271bd7eaa5@skole.hr
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/mmp/clk-of-pxa1928.c
include/dt-bindings/clock/marvell,pxa1928.h

index 2508a0d795f876171868b472017d24da1af82d61..9def4b5f10e910b18065647dcde2a44c43b8185d 100644 (file)
@@ -22,6 +22,9 @@
 
 #define MPMU_UART_PLL  0x14
 
+#define APBC_NR_CLKS   48
+#define APMU_NR_CLKS   96
+
 struct pxa1928_clk_unit {
        struct mmp_clk_unit unit;
        void __iomem *mpmu_base;
@@ -235,7 +238,7 @@ static void __init pxa1928_apmu_clk_init(struct device_node *np)
                return;
        }
 
-       mmp_clk_init(np, &pxa_unit->unit, PXA1928_APMU_NR_CLKS);
+       mmp_clk_init(np, &pxa_unit->unit, APMU_NR_CLKS);
 
        pxa1928_axi_periph_clk_init(pxa_unit);
 }
@@ -256,7 +259,7 @@ static void __init pxa1928_apbc_clk_init(struct device_node *np)
                return;
        }
 
-       mmp_clk_init(np, &pxa_unit->unit, PXA1928_APBC_NR_CLKS);
+       mmp_clk_init(np, &pxa_unit->unit, APBC_NR_CLKS);
 
        pxa1928_apb_periph_clk_init(pxa_unit);
        pxa1928_clk_reset_init(np, pxa_unit);
index 5dca4820297fed620587c438f7b7c4ee4abad426..0c708d3d33144acfa5c4b2921d943ed1801d405e 100644 (file)
@@ -36,7 +36,6 @@
 #define PXA1928_CLK_THSENS_CPU         0x26
 #define PXA1928_CLK_THSENS_VPU         0x27
 #define PXA1928_CLK_THSENS_GC          0x28
-#define PXA1928_APBC_NR_CLKS           0x30
 
 
 /* axi peripherals */
@@ -53,6 +52,4 @@
 #define PXA1928_CLK_GC3D               0x5d
 #define PXA1928_CLK_GC2D               0x5f
 
-#define PXA1928_APMU_NR_CLKS           0x60
-
 #endif