MmcIdentification: Don't error out for SD cards
authorOlivier Martin <olivier.martin@arm.com>
Wed, 5 Feb 2014 12:54:46 +0000 (12:54 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Wed, 5 Feb 2014 12:54:46 +0000 (12:54 +0000)
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

EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c

index 32efe19..08cc405 100644 (file)
@@ -222,7 +222,8 @@ MmcIdentificationMode (
     return Status;\r
   }\r
 \r
-  // Send CMD1 to get OCR (SD / MMC)\r
+  // Send CMD1 to get OCR (MMC)\r
+  // This command only valid for MMC and eMMC\r
   Status = MmcHost->SendCommand (MmcHost, MMC_CMD1, EMMC_CMD1_CAPACITY_GREATER_THAN_2GB);\r
   if (Status == EFI_SUCCESS) {\r
     Status = MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_OCR, (UINT32 *)&OcrResponse);\r
@@ -242,13 +243,11 @@ MmcIdentificationMode (
     else {\r
       MmcHostInstance->CardInfo.OCRData.AccessMode = 0x0;\r
     }\r
+    // Check whether MMC or eMMC\r
     if (OcrResponse.Raw == EMMC_CMD1_CAPACITY_GREATER_THAN_2GB ||\r
         OcrResponse.Raw == EMMC_CMD1_CAPACITY_LESS_THAN_2GB) {\r
       return EmmcIdentificationMode (MmcHostInstance, OcrResponse);\r
     }\r
-  } else {\r
-    DEBUG ((EFI_D_ERROR, "MmcIdentificationMode(MMC_CMD1) : Failed to send command, Status=%r.\n", Status));\r
-    return Status;\r
   }\r
 \r
   // Are we using SDIO ?\r