summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDong Aisheng <b29396@freescale.com>2014-08-06 13:04:09 +0800
committerJason Liu <jason.hui.liu@nxp.com>2019-02-12 10:23:27 +0800
commite65e1c23d756041d54cd76fa8ce93ae40e38b29d (patch)
treec77b41256eef4cf859c476abef7c6020472dab93 /drivers
parentbb3a025c044b86f6b6033e09d237f85a9bbc8629 (diff)
MLK-11685-7 mmc: core: add delay for SD3.0 UHS mode switch
We may meet the following errors with a SD3.0 DDR50 cards during reboot test. mmc0: new ultra high speed DDR50 SDHC card at address aaaa mmcblk0: mmc0:aaaa SU08G 7.40 GiB mmcblk0: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0xb00 mmcblk0: retrying using single block read mmcblk0: error -84 transferring data, sector 0, nr 8, cmd response 0x900, card status 0x0 end_request: I/O error, dev mmcblk0, sector 0 ..... Buffer I/O error on device mmcblk0, logical block 0 mmcblk0: unable to read partition table The root cause is still unknown. Since there's an errata of Sandisk eMMC card before that it requires delay for CMD6 for eMMC DDR mode to work stable, we also suspect the SD3.0 DDR requires similar delay. (Still not confirmed by Sandisk) By adding the delay, the overnight reboot test(run 2000+ times) did not show the issue anymore. Originally it can easy show the error after about 20 times of reboot test. So this patch would be the temporary workaround for Sandisk SD3.0 DDR50 mode unstable issue. Signed-off-by: Dong Aisheng <b29396@freescale.com> (cherry picked from commit ef3bce5feb2ed36c9f4483287454d35ae330dbe3) (cherry picked from commit c0cbde8a248036fae1768f232385290c23eddbd7) (cherry picked from commit 138bab9f78ea2285b6e7c7cd6c8cd956def44003) (cherry picked from commit 12d7e80e7505027feed3eb1ee6d037b1e6df249b) Signed-off-by: Haibo Chen <haibo.chen@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/core/sd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index eb9de2134967..cf640239fcdd 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -480,6 +480,13 @@ static int sd_set_bus_speed_mode(struct mmc_card *card, u8 *status)
else {
mmc_set_timing(card->host, timing);
mmc_set_clock(card->host, card->sw_caps.uhs_max_dtr);
+
+ /*
+ * FIXME: Sandisk SD3.0 cards DDR50 mode requires such
+ * delay to get stable, without this delay we may encounter
+ * CRC errors after switch to DDR50 mode
+ */
+ mmc_delay(100);
}
return 0;