s5p: mmc: allow for eMMC 74 clock generation
authorMinkyu Kang <mk7.kang@samsung.com>
Thu, 2 Dec 2010 03:05:08 +0000 (12:05 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 2 Dec 2010 03:05:08 +0000 (12:05 +0900)
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
drivers/mmc/s5p_mmc.c

index 3ec28a4..4964325 100644 (file)
@@ -420,9 +420,16 @@ static void mmc_set_ios(struct mmc *mmc)
 
        writel(val, &host->reg->control3);
 
-
        mmc_change_clock(host, mmc->clock);
 
+       /*
+        * eMMC spec calls for the host to send 74 clocks to the card
+        * during initialization, right after voltage stabilization.
+        * create the clocks manually right here.
+        */
+       if (mmc->clock)
+               udelay(74 * 1000000 / mmc->clock);
+
        ctrl = readb(&host->reg->hostctl);
 
        /*