]> git.sur5r.net Git - u-boot/commitdiff
Revert "mmc: retry the cmd8 to meet 74 clocks requirement in the spec"
authorMacpaul Lin <macpaul@andestech.com>
Mon, 14 Nov 2011 23:35:39 +0000 (23:35 +0000)
committerAndy Fleming <afleming@freescale.com>
Fri, 25 Nov 2011 23:43:05 +0000 (17:43 -0600)
This reverts commit 02f3029f1810b99869254d0cf0a71946a008a728.

This patch add 3 times retry to CMD8 because the Marvell mmc controller
doesn't obey the power ramp up process in the SD specification 6.4.1.
(Please refer to figure 6.1 and 6.2 in the specification.)

The CMD0 should be send after power ramp up has been finished.
However, the Marvell mmc contorller must do power ramp up after the
first CMD0 command has been send.

This patch also affect existing platforms like Nokia N900 and other
platforms.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Acked-by: Lei Wen <leiwen@marvell.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
drivers/mmc/mmc.c

index 37ce6e85a1352ca6f6e93cd1cd4aadcf7060a19d..21665ecc5b9288356becf9f0269494b1748374f3 100644 (file)
@@ -1190,7 +1190,7 @@ block_dev_desc_t *mmc_get_dev(int dev)
 
 int mmc_init(struct mmc *mmc)
 {
-       int err, retry = 3;
+       int err;
 
        if (mmc->has_init)
                return 0;
@@ -1213,19 +1213,7 @@ int mmc_init(struct mmc *mmc)
        mmc->part_num = 0;
 
        /* Test for SD version 2 */
-       /*
-        * retry here for 3 times, as for some controller it has dynamic
-        * clock gating, and only toggle out clk when the first cmd0 send
-        * out, while some card strictly obey the 74 clocks rule, the interval
-        * may not be sufficient between the cmd0 and this cmd8, retry to
-        * fulfil the clock requirement
-        */
-       do {
-               err = mmc_send_if_cond(mmc);
-       } while (--retry > 0 && err);
-
-       if (err)
-               return err;
+       err = mmc_send_if_cond(mmc);
 
        /* Now try to get the SD card's operating condition */
        err = sd_send_op_cond(mmc);