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

clk: samsung: Rework clkdev alias handling in Exynos5440 driver

Exynos5440 still uses old, non-dt CPUfreq driver, which requires clkdev
aliases to get access to proper clocks. Create those aliases using
samsung_clk_register_alias() function instead of using *_A clock macros,
which will be removed soon.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>

authored by

Marek Szyprowski and committed by
Sylwester Nawrocki
efea8d37 36ba4824

+10 -2
+10 -2
drivers/clk/samsung/clk-exynos5440.c
··· 53 53 /* mux clocks */ 54 54 static const struct samsung_mux_clock exynos5440_mux_clks[] __initconst = { 55 55 MUX(0, "mout_spi", mout_spi_p, MISC_DOUT1, 5, 1), 56 - MUX_A(CLK_ARM_CLK, "arm_clk", mout_armclk_p, 57 - CPU_CLK_STATUS, 0, 1, "armclk"), 56 + MUX(CLK_ARM_CLK, "arm_clk", mout_armclk_p, CPU_CLK_STATUS, 0, 1), 58 57 }; 59 58 60 59 /* divider clocks */ ··· 116 117 PLL(pll_2550x, CLK_CPLLB, "cpllb", "xtal", 0, 0x50, NULL), 117 118 }; 118 119 120 + /* 121 + * Clock aliases for legacy clkdev look-up. 122 + */ 123 + static const struct samsung_clock_alias exynos5440_aliases[] __initconst = { 124 + ALIAS(CLK_ARM_CLK, NULL, "armclk"), 125 + }; 126 + 119 127 /* register exynos5440 clocks */ 120 128 static void __init exynos5440_clk_init(struct device_node *np) 121 129 { ··· 153 147 ARRAY_SIZE(exynos5440_div_clks)); 154 148 samsung_clk_register_gate(ctx, exynos5440_gate_clks, 155 149 ARRAY_SIZE(exynos5440_gate_clks)); 150 + samsung_clk_register_alias(ctx, exynos5440_aliases, 151 + ARRAY_SIZE(exynos5440_aliases)); 156 152 157 153 samsung_clk_of_add_provider(np, ctx); 158 154