diff mbox

[U-Boot] SD/MMC timming issue when upgrading from 2010.09 to 2010.12 version

Message ID CAHr1+-YRBvPwiLkf1bgWQiEkQuujwfNrhS9Jc4JT=YkzX+Lc0w@mail.gmail.com
State RFC
Delegated to: Andy Fleming
Headers show

Commit Message

Aaron Wu Aug. 16, 2011, 4:36 a.m. UTC
Hello Sir,

I am using the u-boot on a blackfin board. When upgrading the u-boot
from version 2010.09 to 2010.12 I met a a problem which looks like
timming related. I'm doing the following test with a Sandisk 256MB SD
card.

mmc rescan 0
fatls mmc 0

with 2010.09 version everything works fine, with 2010.12 version I
will have to add a delay as the following patch indicates to pass the
test. Or it will fail when calling the mmc_startup function in the
mmc_send_cmd function when trying to do the sd_change_freq according
to my debug. It returns a -18 error which means a communication error,
to be specific, it's a hardware data crc error happened on my specific
SD controller.  While actually the driver code for my controller is
identical for both versions.

Since adding a delay would pass the test I guess it would be a timming
issue, could some one please shed some light?

Thanks
Aaron
diff mbox

Patch

--- drivers/mmc/mmc.c   2011-08-16 12:31:53.293745081 +0800
+++ drivers/mmc/mmc_new.c       2011-08-16 12:34:02.597745252 +0800
@@ -635,6 +635,7 @@ 
        cmd.flags = 0;

        err = mmc_send_cmd(mmc, &cmd, NULL);
+       delay(2000);

        if (err)
                return err;