diff options
author | Andrzej Hajda <a.hajda@samsung.com> | 2018-02-20 08:05:39 +0100 |
---|---|---|
committer | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2018-02-23 15:15:20 +0100 |
commit | 1d5013f1b64dbd692975be5db0e42bac291c6de9 (patch) | |
tree | 2350d997075252d6895efe1541ad27274cd7b776 /drivers/clk/samsung/clk-exynos7.c | |
parent | 179db533c08431f509a3823077549773d519358b (diff) | |
download | linux-1d5013f1b64dbd692975be5db0e42bac291c6de9.tar.gz linux-1d5013f1b64dbd692975be5db0e42bac291c6de9.tar.bz2 linux-1d5013f1b64dbd692975be5db0e42bac291c6de9.zip |
clk: samsung: Add compile time PLL rate validators
Rates declared in PLL rate tables should match exactly rates calculated
from PLL coefficients. To avoid possible mistakes we can use compile
time validation.
The patch introduces such validators and expands all initializers
with additional input frequency parameter, required to validate rates.
Since S3C24xx PLLs requires different validators two new macros have
been introduced to deal with it. Also, since PLLs 4502 and 4508 have
different formulas PLL_45XX_RATE has been replaced with PLL_4508_RATE.
As the patch adds only compile time validators it should not have impact
on compiled code.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Diffstat (limited to 'drivers/clk/samsung/clk-exynos7.c')
-rw-r--r-- | drivers/clk/samsung/clk-exynos7.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/clk/samsung/clk-exynos7.c b/drivers/clk/samsung/clk-exynos7.c index bbfa57b4e017..492d51691080 100644 --- a/drivers/clk/samsung/clk-exynos7.c +++ b/drivers/clk/samsung/clk-exynos7.c @@ -140,7 +140,7 @@ static const struct samsung_div_clock topc_div_clks[] __initconst = { }; static const struct samsung_pll_rate_table pll1460x_24mhz_tbl[] __initconst = { - PLL_36XX_RATE(491519897, 20, 1, 0, 31457), + PLL_36XX_RATE(24 * MHZ, 491519897, 20, 1, 0, 31457), {}, }; |