Skip to content

Commit 835dc5a

Browse files
committed
clk: samsung: exynos5250: 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 <[email protected]> Reviewed-by: Chanwoo Choi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
1 parent 826951d commit 835dc5a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

drivers/clk/samsung/clk-exynos5250.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,9 @@
100100
#define PWR_CTRL2_CORE2_UP_RATIO (1 << 4)
101101
#define PWR_CTRL2_CORE1_UP_RATIO (1 << 0)
102102

103+
/* NOTE: Must be equal to the last clock ID increased by one */
104+
#define CLKS_NR (CLK_MOUT_VPLLSRC + 1)
105+
103106
/* list of PLLs to be registered */
104107
enum exynos5250_plls {
105108
apll, mpll, cpll, epll, vpll, gpll, bpll,
@@ -797,7 +800,7 @@ static void __init exynos5250_clk_init(struct device_node *np)
797800
panic("%s: unable to determine soc\n", __func__);
798801
}
799802

800-
ctx = samsung_clk_init(NULL, reg_base, CLK_NR_CLKS);
803+
ctx = samsung_clk_init(NULL, reg_base, CLKS_NR);
801804
hws = ctx->clk_data.hws;
802805

803806
samsung_clk_of_register_fixed_ext(ctx, exynos5250_fixed_rate_ext_clks,

0 commit comments

Comments
 (0)