Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

clk: samsung: exynos3250: do not define number of clocks in bindings

Number of clocks supported by Linux drivers might vary - sometimes we
add new clocks, not exposed previously. Therefore these numbers of
clocks should not be in the bindings, as that prevents changing them.

Define number of clocks per each clock controller inside the driver
directly.

Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://lore.kernel.org/r/20230808082738.122804-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

+8 -3
+8 -3
drivers/clk/samsung/clk-exynos3250.c
··· 100 100 #define PWR_CTRL1_USE_CORE1_WFI (1 << 1) 101 101 #define PWR_CTRL1_USE_CORE0_WFI (1 << 0) 102 102 103 + /* NOTE: Must be equal to the last clock ID increased by one */ 104 + #define CLKS_NR_MAIN (CLK_SCLK_MMC2 + 1) 105 + #define CLKS_NR_DMC (CLK_DIV_DMCD + 1) 106 + #define CLKS_NR_ISP (CLK_SCLK_MPWM_ISP + 1) 107 + 103 108 static const unsigned long exynos3250_cmu_clk_regs[] __initconst = { 104 109 SRC_LEFTBUS, 105 110 DIV_LEFTBUS, ··· 812 807 .nr_fixed_factor_clks = ARRAY_SIZE(fixed_factor_clks), 813 808 .cpu_clks = exynos3250_cpu_clks, 814 809 .nr_cpu_clks = ARRAY_SIZE(exynos3250_cpu_clks), 815 - .nr_clk_ids = CLK_NR_CLKS, 810 + .nr_clk_ids = CLKS_NR_MAIN, 816 811 .clk_regs = exynos3250_cmu_clk_regs, 817 812 .nr_clk_regs = ARRAY_SIZE(exynos3250_cmu_clk_regs), 818 813 }; ··· 928 923 .nr_mux_clks = ARRAY_SIZE(dmc_mux_clks), 929 924 .div_clks = dmc_div_clks, 930 925 .nr_div_clks = ARRAY_SIZE(dmc_div_clks), 931 - .nr_clk_ids = NR_CLKS_DMC, 926 + .nr_clk_ids = CLKS_NR_DMC, 932 927 .clk_regs = exynos3250_cmu_dmc_clk_regs, 933 928 .nr_clk_regs = ARRAY_SIZE(exynos3250_cmu_dmc_clk_regs), 934 929 }; ··· 1072 1067 .nr_div_clks = ARRAY_SIZE(isp_div_clks), 1073 1068 .gate_clks = isp_gate_clks, 1074 1069 .nr_gate_clks = ARRAY_SIZE(isp_gate_clks), 1075 - .nr_clk_ids = NR_CLKS_ISP, 1070 + .nr_clk_ids = CLKS_NR_ISP, 1076 1071 }; 1077 1072 1078 1073 static int __init exynos3250_cmu_isp_probe(struct platform_device *pdev)