]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
clk: samsung: exynos5420: The EPLL rate table corrections
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Fri, 21 Jul 2017 11:19:50 +0000 (13:19 +0200)
committerStephen Boyd <sboyd@codeaurora.org>
Mon, 31 Jul 2017 20:16:03 +0000 (13:16 -0700)
commit5b30850bd6bda5188eedec60d364256617a87343
treeff5010155c5662f5ef0e96102b60a1a5b9548e41
parentd31fd43c0f9a41e2678a1e78c0f22f0384c6edd3
clk: samsung: exynos5420: The EPLL rate table corrections

This patch fixes values of the EPLL K coefficient and changes
the EPLL output frequency values to match exactly what is
possible to achieve with given M, P, S, K coefficients.
This allows to avoid rounding errors and unexpected frequency
being set with clk_set_rate(), due to recalc_rate returning
different values than the PLL rate specified in the
exynos5420_epll_24mhz_tbl table. E.g. this prevents a case
where two consecutive clk_set_rate() calls with same argument
result in different PLL output frequency.

The PLL output frequencies have been calculated with formula:

f = fxtal * (M * 2^16 + K) / (P * 2^S) / 2^16

where fxtal = 24000000.

Fixes: 9842452acd ("clk: samsung: exynos542x: Add EPLL rate table")
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
drivers/clk/samsung/clk-exynos5420.c