Hi,
In v4 of my PXA1908 series, Conor suggested that the NR_CLKS variables
in dt bindings should be moved to the respective driver source files
because these are not used by the device trees and so are needlessly
added to the ABI. This series does that for the rest of the Marvell
PXA/MMP SoCs.
Link: https://lore.kernel.org/r/20230808-produce-thievish-3ce1b86a114b@spud/
Signed-off-by: Duje Mihanović <[email protected]>
---
Changes in v2:
- Fix clk-audio.c compile error
- Reword mmp2 commit to match other commits
- Link to v1: https://lore.kernel.org/r/[email protected]
---
Duje Mihanović (4):
clk: mmp2: Move number of clocks to driver source
clk: pxa168: Move number of clocks to driver source
clk: pxa1928: Move number of clocks to driver source
clk: pxa910: Move number of clocks to driver source
drivers/clk/mmp/clk-audio.c | 6 ++++--
drivers/clk/mmp/clk-of-mmp2.c | 4 +++-
drivers/clk/mmp/clk-of-pxa168.c | 4 +++-
drivers/clk/mmp/clk-of-pxa1928.c | 7 +++++--
drivers/clk/mmp/clk-of-pxa910.c | 4 +++-
include/dt-bindings/clock/marvell,mmp2-audio.h | 1 -
include/dt-bindings/clock/marvell,mmp2.h | 1 -
include/dt-bindings/clock/marvell,pxa168.h | 1 -
include/dt-bindings/clock/marvell,pxa1928.h | 3 ---
include/dt-bindings/clock/marvell,pxa910.h | 1 -
10 files changed, 18 insertions(+), 14 deletions(-)
---
base-commit: 52a93d39b17dc7eb98b6aa3edb93943248e03b2f
change-id: 20230809-mmp-nr-clks-7c80e416e6bf
Best regards,
--
Duje Mihanović <[email protected]>
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ć <[email protected]>
---
drivers/clk/mmp/clk-of-pxa1928.c | 7 +++++--
include/dt-bindings/clock/marvell,pxa1928.h | 3 ---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/mmp/clk-of-pxa1928.c b/drivers/clk/mmp/clk-of-pxa1928.c
index 2508a0d795f8..9def4b5f10e9 100644
--- a/drivers/clk/mmp/clk-of-pxa1928.c
+++ b/drivers/clk/mmp/clk-of-pxa1928.c
@@ -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);
diff --git a/include/dt-bindings/clock/marvell,pxa1928.h b/include/dt-bindings/clock/marvell,pxa1928.h
index 5dca4820297f..0c708d3d3314 100644
--- a/include/dt-bindings/clock/marvell,pxa1928.h
+++ b/include/dt-bindings/clock/marvell,pxa1928.h
@@ -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
--
2.41.0
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ć <[email protected]>
---
drivers/clk/mmp/clk-of-pxa168.c | 4 +++-
include/dt-bindings/clock/marvell,pxa168.h | 1 -
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/mmp/clk-of-pxa168.c b/drivers/clk/mmp/clk-of-pxa168.c
index 130d1a723879..fb0df64cf053 100644
--- a/drivers/clk/mmp/clk-of-pxa168.c
+++ b/drivers/clk/mmp/clk-of-pxa168.c
@@ -62,6 +62,8 @@
#define APMU_EPD 0x104
#define MPMU_UART_PLL 0x14
+#define NR_CLKS 200
+
struct pxa168_clk_unit {
struct mmp_clk_unit unit;
void __iomem *mpmu_base;
@@ -321,7 +323,7 @@ static void __init pxa168_clk_init(struct device_node *np)
return;
}
- mmp_clk_init(np, &pxa_unit->unit, PXA168_NR_CLKS);
+ mmp_clk_init(np, &pxa_unit->unit, NR_CLKS);
pxa168_pll_init(pxa_unit);
diff --git a/include/dt-bindings/clock/marvell,pxa168.h b/include/dt-bindings/clock/marvell,pxa168.h
index c92d969ae941..d1bb59187e1d 100644
--- a/include/dt-bindings/clock/marvell,pxa168.h
+++ b/include/dt-bindings/clock/marvell,pxa168.h
@@ -63,5 +63,4 @@
#define PXA168_CLK_SDH01_AXI 111
#define PXA168_CLK_SDH23_AXI 112
-#define PXA168_NR_CLKS 200
#endif
--
2.41.0
On Sat, Aug 12, 2023 at 12:02:55PM +0200, Duje Mihanović wrote:
> Hi,
>
> In v4 of my PXA1908 series, Conor suggested that the NR_CLKS variables
> in dt bindings should be moved to the respective driver source files
> because these are not used by the device trees and so are needlessly
> added to the ABI. This series does that for the rest of the Marvell
> PXA/MMP SoCs.
>
> Link: https://lore.kernel.org/r/20230808-produce-thievish-3ce1b86a114b@spud/
> Signed-off-by: Duje Mihanović <[email protected]>
Acked-by: Conor Dooley <[email protected]>
Thanks,
conor.
> ---
> Changes in v2:
> - Fix clk-audio.c compile error
> - Reword mmp2 commit to match other commits
> - Link to v1: https://lore.kernel.org/r/[email protected]
>
> ---
> Duje Mihanović (4):
> clk: mmp2: Move number of clocks to driver source
> clk: pxa168: Move number of clocks to driver source
> clk: pxa1928: Move number of clocks to driver source
> clk: pxa910: Move number of clocks to driver source
>
> drivers/clk/mmp/clk-audio.c | 6 ++++--
> drivers/clk/mmp/clk-of-mmp2.c | 4 +++-
> drivers/clk/mmp/clk-of-pxa168.c | 4 +++-
> drivers/clk/mmp/clk-of-pxa1928.c | 7 +++++--
> drivers/clk/mmp/clk-of-pxa910.c | 4 +++-
> include/dt-bindings/clock/marvell,mmp2-audio.h | 1 -
> include/dt-bindings/clock/marvell,mmp2.h | 1 -
> include/dt-bindings/clock/marvell,pxa168.h | 1 -
> include/dt-bindings/clock/marvell,pxa1928.h | 3 ---
> include/dt-bindings/clock/marvell,pxa910.h | 1 -
> 10 files changed, 18 insertions(+), 14 deletions(-)
> ---
> base-commit: 52a93d39b17dc7eb98b6aa3edb93943248e03b2f
> change-id: 20230809-mmp-nr-clks-7c80e416e6bf
>
> Best regards,
> --
> Duje Mihanović <[email protected]>
>
>
Quoting Duje Mihanović (2023-08-12 03:02:57)
> 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ć <[email protected]>
> ---
Applied to clk-next
Quoting Duje Mihanović (2023-08-12 03:02:58)
> 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ć <[email protected]>
> ---
Applied to clk-next