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: exynos4: 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-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

+8 -2
+4 -1
drivers/clk/samsung/clk-exynos4.c
··· 135 135 #define PWR_CTRL1_USE_CORE1_WFI (1 << 1) 136 136 #define PWR_CTRL1_USE_CORE0_WFI (1 << 0) 137 137 138 + /* NOTE: Must be equal to the last clock ID increased by one */ 139 + #define CLKS_NR (CLK_DIV_CORE2 + 1) 140 + 138 141 /* the exynos4 soc type */ 139 142 enum exynos4_soc { 140 143 EXYNOS4210, ··· 1278 1275 if (!reg_base) 1279 1276 panic("%s: failed to map registers\n", __func__); 1280 1277 1281 - ctx = samsung_clk_init(NULL, reg_base, CLK_NR_CLKS); 1278 + ctx = samsung_clk_init(NULL, reg_base, CLKS_NR); 1282 1279 hws = ctx->clk_data.hws; 1283 1280 1284 1281 samsung_clk_of_register_fixed_ext(ctx, exynos4_fixed_rate_ext_clks,
+4 -1
drivers/clk/samsung/clk-exynos4412-isp.c
··· 22 22 #define E4X12_GATE_ISP0 0x0800 23 23 #define E4X12_GATE_ISP1 0x0804 24 24 25 + /* NOTE: Must be equal to the last clock ID increased by one */ 26 + #define CLKS_NR_ISP (CLK_ISP_DIV_MCUISP1 + 1) 27 + 25 28 /* 26 29 * Support for CMU save/restore across system suspends 27 30 */ ··· 124 121 if (!exynos4x12_save_isp) 125 122 return -ENOMEM; 126 123 127 - ctx = samsung_clk_init(dev, reg_base, CLK_NR_ISP_CLKS); 124 + ctx = samsung_clk_init(dev, reg_base, CLKS_NR_ISP); 128 125 129 126 platform_set_drvdata(pdev, ctx); 130 127