mmc: sdhci-of-esdhc: Pre divider starts at 1
authorJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
Mon, 20 Apr 2015 21:12:13 +0000 (23:12 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 1 Jun 2015 07:06:39 +0000 (09:06 +0200)
For PowerPC esdhc pre divider starts at 1, fixing the increases
the actual clock from 40KHz to 50 KHz.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@transmode.se>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-of-esdhc.c

index 22e9111b11ffcbfcfcfeba35ba9ab260256a9de7..1804bdbdb1454d31c4807ca2d96dd31acad43c5c 100644 (file)
@@ -199,7 +199,7 @@ static unsigned int esdhc_of_get_min_clock(struct sdhci_host *host)
 
 static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
 {
-       int pre_div = 2;
+       int pre_div = 1;
        int div = 1;
        u32 temp;
 
@@ -229,7 +229,7 @@ static void esdhc_of_set_clock(struct sdhci_host *host, unsigned int clock)
 
        dev_dbg(mmc_dev(host->mmc), "desired SD clock: %d, actual: %d\n",
                clock, host->max_clk / pre_div / div);
-
+       host->mmc->actual_clock = host->max_clk / pre_div / div;
        pre_div >>= 1;
        div--;