diff options
author | Olivier Martin <olivier.martin@arm.com> | 2014-02-05 12:54:46 +0000 |
---|---|---|
committer | oliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-02-05 12:54:46 +0000 |
commit | 139b57737413a7d95bc35edf4a5463a599965edb (patch) | |
tree | 65e99b9da6900147e3065e1cc31b132c2d5face0 /EmbeddedPkg/Universal | |
parent | 80ae629190d77fd552a9bd9dc48e6d2da3683ecc (diff) | |
download | edk2-139b57737413a7d95bc35edf4a5463a599965edb.tar.gz edk2-139b57737413a7d95bc35edf4a5463a599965edb.tar.bz2 edk2-139b57737413a7d95bc35edf4a5463a599965edb.zip |
MmcIdentification: Don't error out for SD cards
SD cards don't respond to CMD1 immediately following CMD0.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15210 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg/Universal')
-rw-r--r-- | EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c index 32efe19c31..08cc405ed8 100644 --- a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c +++ b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c @@ -222,7 +222,8 @@ MmcIdentificationMode ( return Status;
}
- // Send CMD1 to get OCR (SD / MMC)
+ // Send CMD1 to get OCR (MMC)
+ // This command only valid for MMC and eMMC
Status = MmcHost->SendCommand (MmcHost, MMC_CMD1, EMMC_CMD1_CAPACITY_GREATER_THAN_2GB);
if (Status == EFI_SUCCESS) {
Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_OCR, (UINT32 *)&OcrResponse);
@@ -242,13 +243,11 @@ MmcIdentificationMode ( else {
MmcHostInstance->CardInfo.OCRData.AccessMode = 0x0;
}
+ // Check whether MMC or eMMC
if (OcrResponse.Raw == EMMC_CMD1_CAPACITY_GREATER_THAN_2GB ||
OcrResponse.Raw == EMMC_CMD1_CAPACITY_LESS_THAN_2GB) {
return EmmcIdentificationMode (MmcHostInstance, OcrResponse);
}
- } else {
- DEBUG ((EFI_D_ERROR, "MmcIdentificationMode(MMC_CMD1) : Failed to send command, Status=%r.\n", Status));
- return Status;
}
// Are we using SDIO ?
|