android_kernel_oneplus_msm8998/drivers/clk/samsung
Andrzej Hajda 3367b08ebc clk: samsung: exynos3250: Fix PLL rates
[ Upstream commit a8321e7887410a2b2e80ab89d1ef7b30562658ea ]

Rates declared in PLL rate tables should match exactly rates calculated
from PLL coefficients. If that is not the case, rate of the PLL's child clock
might be set not as expected. For instance, if in the PLL rates table we have
a 393216000 Hz entry and the real value as returned by the PLL's recalc_rate
callback is 393216003, after setting PLL's clk rate to 393216000 clk_get_rate
will return 393216003. If we now attempt to set rate of a PLL's child divider
clock to 393216000/2 its rate will be 131072001, rather than 196608000.
That is, the divider will be set to 3 instead of 2, because 393216003/2 is
greater than 196608000.

To fix this issue declared rates are changed to exactly match rates generated
by the PLL, as calculated from the P, M, S, K coefficients.

In this patch an erroneous P value for 74176002 output frequency is also
corrected.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Acked-by: Tomasz Figa <tomasz.figa@gmail.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-30 07:49:16 +02:00
..
clk-cpu.c clk: exynos: use irqsave version of spin_lock to avoid deadlock with irqs 2016-03-03 15:07:17 -08:00
clk-cpu.h clk: samsung: add infrastructure to register cpu clocks 2015-06-20 12:17:42 -07:00
clk-exynos-audss.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk-exynos-clkout.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk-exynos4.c ARM: SoC: late fixes and dependencies 2015-09-10 17:59:04 -07:00
clk-exynos7.c clk: samsung: exynos7: Staticize file scope symbols 2015-10-02 11:35:32 -07:00
clk-exynos3250.c clk: samsung: exynos3250: Fix PLL rates 2018-05-30 07:49:16 +02:00
clk-exynos4415.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk-exynos5250.c clk: samsung: exynos5250: Fix PLL rates 2018-05-30 07:49:16 +02:00
clk-exynos5260.c clk: samsung: exynos5260: Fix PLL rates 2018-05-30 07:49:15 +02:00
clk-exynos5260.h clk/exynos5260: add clock file for exynos5260 2014-05-14 19:16:55 +02:00
clk-exynos5410.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk-exynos5420.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk-exynos5433.c clk: samsung: exynos5433: Fix PLL rates 2018-05-30 07:49:16 +02:00
clk-exynos5440.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk-pll.c clk: Convert __clk_get_name(hw->clk) to clk_hw_get_name(hw) 2015-08-24 16:49:12 -07:00
clk-pll.h clk: samsung: add support for 145xx and 1460x PLLs 2014-10-31 10:45:35 +01:00
clk-s3c64xx.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk-s3c2410-dclk.c clk: Replace __clk_get_num_parents with clk_hw_get_num_parents() 2015-08-24 16:48:43 -07:00
clk-s3c2410.c clk: samsung: s3c2410: Fix PLL rates 2018-05-30 07:49:15 +02:00
clk-s3c2412.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk-s3c2443.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk-s5pv210-audss.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk-s5pv210.c clk: s5pv210: add missing call to samsung_clk_of_add_provider() 2015-08-27 12:03:21 -07:00
clk.c clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
clk.h clk: samsung: Properly include clk.h and clkdev.h 2015-07-20 11:11:11 -07:00
Kconfig ARM: S3C24XX: move S3C24XX clock Kconfig options to Samsung clock Kconfig file 2014-05-14 19:41:15 +02:00
Makefile clk: samsung: add infrastructure to register cpu clocks 2015-06-20 12:17:42 -07:00