]> git.sur5r.net Git - u-boot/commitdiff
Exynos5: clock: Update the equation to calculate PLL output frequency
authorAkshay Saraswat <akshay.s@samsung.com>
Fri, 22 Mar 2013 02:26:36 +0000 (02:26 +0000)
committerMinkyu Kang <mk7.kang@samsung.com>
Tue, 21 May 2013 11:17:30 +0000 (20:17 +0900)
According to the latest exynos5 user manual, the equation for
calculating PLL output was changed to
FOUT= MDIV x FIN/(PDIV x 2^SDIV)
earlier it was
FOUT= MDIV x FIN/(PDIV x 2^(SDIV -1))
So updating the clock code accordingly.

Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
arch/arm/cpu/armv7/exynos/clock.c

index 223660aab6d57ceb3b4118c9a898f6bd8afd025d..1203adaad93104d494c672f9c27d1754e453252d 100644 (file)
@@ -116,10 +116,8 @@ static int exynos_get_pll_clk(int pllreg, unsigned int r, unsigned int k)
                /* FOUT = (MDIV + K / 1024) * FIN / (PDIV * 2^SDIV) */
                fout = (m + k / 1024) * (freq / (p * (1 << s)));
        } else {
-               if (s < 1)
-                       s = 1;
-               /* FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1)) */
-               fout = m * (freq / (p * (1 << (s - 1))));
+               /* FOUT = MDIV * FIN / (PDIV * 2^SDIV) */
+               fout = m * (freq / (p * (1 << s)));
        }
 
        return fout;