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
This commit is contained in:
Olivier Martin 2014-02-05 12:54:46 +00:00 committed by oliviermartin
parent 80ae629190
commit 139b577374
1 changed files with 3 additions and 4 deletions

View File

@ -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 ?