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

clk: samsung: exynos7885: Correct "div4" clock parents

"div4" DIVs which divide PLLs by 4 are actually dividing "div2" DIVs by
2 to achieve a by 4 division, thus their parents are the respective
"div2" DIVs. These DIVs were mistakenly set to have the PLLs as parents.
This leads to the kernel thinking "div4"s and everything under them run
at 2x the clock speed. Fix this.

Fixes: 45bd8166a1d8 ("clk: samsung: Add initial Exynos7885 clock driver")
Signed-off-by: David Virag <virag.david003@gmail.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Link: https://lore.kernel.org/r/20221013151341.151208-1-virag.david003@gmail.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

authored by

David Virag and committed by
Krzysztof Kozlowski
ef80c95c 9abf2313

+2 -2
+2 -2
drivers/clk/samsung/clk-exynos7885.c
··· 231 231 CLK_CON_DIV_PLL_SHARED0_DIV2, 0, 1), 232 232 DIV(CLK_DOUT_SHARED0_DIV3, "dout_shared0_div3", "fout_shared0_pll", 233 233 CLK_CON_DIV_PLL_SHARED0_DIV3, 0, 2), 234 - DIV(CLK_DOUT_SHARED0_DIV4, "dout_shared0_div4", "fout_shared0_pll", 234 + DIV(CLK_DOUT_SHARED0_DIV4, "dout_shared0_div4", "dout_shared0_div2", 235 235 CLK_CON_DIV_PLL_SHARED0_DIV4, 0, 1), 236 236 DIV(CLK_DOUT_SHARED0_DIV5, "dout_shared0_div5", "fout_shared0_pll", 237 237 CLK_CON_DIV_PLL_SHARED0_DIV5, 0, 3), ··· 239 239 CLK_CON_DIV_PLL_SHARED1_DIV2, 0, 1), 240 240 DIV(CLK_DOUT_SHARED1_DIV3, "dout_shared1_div3", "fout_shared1_pll", 241 241 CLK_CON_DIV_PLL_SHARED1_DIV3, 0, 2), 242 - DIV(CLK_DOUT_SHARED1_DIV4, "dout_shared1_div4", "fout_shared1_pll", 242 + DIV(CLK_DOUT_SHARED1_DIV4, "dout_shared1_div4", "dout_shared1_div2", 243 243 CLK_CON_DIV_PLL_SHARED1_DIV4, 0, 1), 244 244 245 245 /* CORE */