]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
arm: exynos: fix the div value for set_mmc_clk
authorJaehoon Chung <jh80.chung@samsung.com>
Thu, 8 Jan 2015 07:50:21 +0000 (16:50 +0900)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 1 Sep 2015 11:52:17 +0000 (13:52 +0200)
The most exynos used the  "Ratio + 1" as div value.
And value at register is "Ratio".
So if want to set exact value, it needs to subtract one.

Value at register ("Ratio") = div - 1

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
arch/arm/cpu/armv7/exynos/clock.c

index b31c13b14bfbd1c4d663e4f518bdd486e4736c72..3110bb06575bdc46c0e9d9a94a30bc2bce5322b4 100644 (file)
@@ -1656,6 +1656,10 @@ unsigned long get_mmc_clk(int dev_index)
 
 void set_mmc_clk(int dev_index, unsigned int div)
 {
+       /* If want to set correct value, it needs to substract one from div.*/
+       if (div > 0)
+               div -= 1;
+
        if (cpu_is_exynos5()) {
                if (proid_is_exynos5420() || proid_is_exynos5800())
                        exynos5420_set_mmc_clk(dev_index, div);