CLOCK_COUNT defines for each CCU are stored in the DT binding header. This is not correct - they are not used by device trees, only internally by the driver. Move the CLOCK_COUNT defines directly into the driver in preparation for dropping them from the DT binding include. Signed-off-by: Artur Weber <aweber.kernel@xxxxxxxxx> --- drivers/clk/bcm/clk-bcm21664.c | 8 ++++++++ drivers/clk/bcm/clk-bcm281xx.c | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/drivers/clk/bcm/clk-bcm21664.c b/drivers/clk/bcm/clk-bcm21664.c index 520c3aeb4ea9c4a431512c0909f9545c1761d17a..fa6e1649d6f5f459b63026109caea9e2f72e22dd 100644 --- a/drivers/clk/bcm/clk-bcm21664.c +++ b/drivers/clk/bcm/clk-bcm21664.c @@ -17,6 +17,8 @@ static struct peri_clk_data frac_1m_data = { .clocks = CLOCKS("ref_crystal"), }; +#define BCM21664_ROOT_CCU_CLOCK_COUNT (BCM21664_ROOT_CCU_FRAC_1M + 1) + static struct ccu_data root_ccu_data = { BCM21664_CCU_COMMON(root, ROOT), /* no policy control */ @@ -39,6 +41,8 @@ static struct peri_clk_data hub_timer_data = { .trig = TRIGGER(0x0a40, 4), }; +#define BCM21664_AON_CCU_CLOCK_COUNT (BCM21664_AON_CCU_HUB_TIMER + 1) + static struct ccu_data aon_ccu_data = { BCM21664_CCU_COMMON(aon, AON), .policy = { @@ -122,6 +126,8 @@ static struct peri_clk_data sdio4_sleep_data = { .gate = HW_SW_GATE(0x0360, 18, 2, 3), }; +#define BCM21664_MASTER_CCU_CLOCK_COUNT (BCM21664_MASTER_CCU_SDIO4_SLEEP + 1) + static struct ccu_data master_ccu_data = { BCM21664_CCU_COMMON(master, MASTER), .policy = { @@ -225,6 +231,8 @@ static struct peri_clk_data bsc4_data = { .trig = TRIGGER(0x0afc, 19), }; +#define BCM21664_SLAVE_CCU_CLOCK_COUNT (BCM21664_SLAVE_CCU_BSC4 + 1) + static struct ccu_data slave_ccu_data = { BCM21664_CCU_COMMON(slave, SLAVE), .policy = { diff --git a/drivers/clk/bcm/clk-bcm281xx.c b/drivers/clk/bcm/clk-bcm281xx.c index 823d5dfa31b84f502fcd6ada1eff6d8f4673b3dd..7589ad9db99767485d73e91ed8db4d2842cd6e32 100644 --- a/drivers/clk/bcm/clk-bcm281xx.c +++ b/drivers/clk/bcm/clk-bcm281xx.c @@ -19,6 +19,8 @@ static struct peri_clk_data frac_1m_data = { .clocks = CLOCKS("ref_crystal"), }; +#define BCM281XX_ROOT_CCU_CLOCK_COUNT (BCM281XX_ROOT_CCU_FRAC_1M + 1) + static struct ccu_data root_ccu_data = { BCM281XX_CCU_COMMON(root, ROOT), .kona_clks = { @@ -57,6 +59,8 @@ static struct peri_clk_data pmu_bsc_var_data = { .trig = TRIGGER(0x0a40, 2), }; +#define BCM281XX_AON_CCU_CLOCK_COUNT (BCM281XX_AON_CCU_PMU_BSC_VAR + 1) + static struct ccu_data aon_ccu_data = { BCM281XX_CCU_COMMON(aon, AON), .kona_clks = { @@ -80,6 +84,8 @@ static struct peri_clk_data tmon_1m_data = { .trig = TRIGGER(0x0e84, 1), }; +#define BCM281XX_HUB_CCU_CLOCK_COUNT (BCM281XX_HUB_CCU_TMON_1M + 1) + static struct ccu_data hub_ccu_data = { BCM281XX_CCU_COMMON(hub, HUB), .kona_clks = { @@ -172,6 +178,8 @@ static struct peri_clk_data hsic2_12m_data = { .trig = TRIGGER(0x0afc, 5), }; +#define BCM281XX_MASTER_CCU_CLOCK_COUNT (BCM281XX_MASTER_CCU_HSIC2_12M + 1) + static struct ccu_data master_ccu_data = { BCM281XX_CCU_COMMON(master, MASTER), .kona_clks = { @@ -301,6 +309,8 @@ static struct peri_clk_data pwm_data = { .trig = TRIGGER(0x0afc, 15), }; +#define BCM281XX_SLAVE_CCU_CLOCK_COUNT (BCM281XX_SLAVE_CCU_PWM + 1) + static struct ccu_data slave_ccu_data = { BCM281XX_CCU_COMMON(slave, SLAVE), .kona_clks = { -- 2.48.1