]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg/MmcDxe: Ensure MMC is in Identification Mode
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 19 Oct 2012 09:47:49 +0000 (09:47 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 19 Oct 2012 09:47:49 +0000 (09:47 +0000)
This change ensure the MMC card is in Identification Mode.
The card might be in Data Transfer Mode if a pre UEFI Boot Loader
had initialized the card.
A potential optimization would be to skip the Identification Mode
in this case.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13872 6f19259b-4bc3-4df7-8a09-765794883524

EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c

index e335e48c42b961f9fa21e7a4ca0dc6674fccfbb1..72e6d4c6d10599e27c6bbc414ea2eead207bfd74 100644 (file)
@@ -215,13 +215,12 @@ MmcIdentificationMode (
       DEBUG((EFI_D_ERROR, "MmcIdentificationMode() : Error MmcHwInitializationState\n"));\r
       return Status;\r
     }\r
-  } else {\r
-    //Note: Could even be used in all cases. But it looks this command could put the state machine into inactive for some cards\r
-    Status = MmcHost->SendCommand (MmcHost, MMC_CMD0, 0);\r
-    if (EFI_ERROR(Status)) {\r
-      DEBUG((EFI_D_ERROR, "MmcIdentificationMode(MMC_CMD0): Error\n"));\r
-      return Status;\r
-    }\r
+  }\r
+\r
+  Status = MmcHost->SendCommand (MmcHost, MMC_CMD0, 0);\r
+  if (EFI_ERROR(Status)) {\r
+    DEBUG((EFI_D_ERROR, "MmcIdentificationMode(MMC_CMD0): Error\n"));\r
+    return Status;\r
   }\r
 \r
   Status = MmcNotifyState (MmcHostInstance, MmcIdleState);\r