aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2016-08-02 20:54:57 -0700
committerJohn Stultz <john.stultz@linaro.org>2016-08-02 20:54:57 -0700
commit9b75322471725713a3f36685404c1494a5059a72 (patch)
treed3986c6016d643bc6f5c31e96a820bf1f7e0bcd4
parent537db644f7761f0d9a431b13f76ea951777dcad5 (diff)
downloadOpenPlatformPkg-9b75322471725713a3f36685404c1494a5059a72.tar.gz
Revert "DwSdDxe: avoid sd hang"
This reverts commit 372d6477761ef2fdb912f3546f38a69c49ab3112.
-rw-r--r--Drivers/Mmc/DwSdDxe/DwSdDxe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Drivers/Mmc/DwSdDxe/DwSdDxe.c b/Drivers/Mmc/DwSdDxe/DwSdDxe.c
index eefc6c5..3eb8b1e 100644
--- a/Drivers/Mmc/DwSdDxe/DwSdDxe.c
+++ b/Drivers/Mmc/DwSdDxe/DwSdDxe.c
@@ -287,6 +287,10 @@ SendCommand (
MmioWrite32 (DWSD_RINTSTS, ~0);
MmioWrite32 (DWSD_CMDARG, Argument);
MicroSecondDelay(500);
+ // Wait until MMC is idle
+ do {
+ Data = MmioRead32 (DWSD_STATUS);
+ } while (Data & DWSD_STS_DATA_BUSY);
MmioWrite32 (DWSD_CMD, MmcCmd);