]> git.proxmox.com Git - mirror_edk2.git/commitdiff
EmbeddedPkg/MmcDxe: Fixed MmcIdentificationMode()
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 2 Aug 2012 10:11:29 +0000 (10:11 +0000)
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 2 Aug 2012 10:11:29 +0000 (10:11 +0000)
The condition to check if the card is ready was not correct.

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

EmbeddedPkg/Universal/MmcDxe/Mmc.h
EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c

index c7e8c7e9fa402a22fc9c69adb9d2cbea779d4fe5..0c51428e9eac9494ccccfba98dd70ea434ba2381 100644 (file)
@@ -69,7 +69,7 @@ typedef struct {
   UINT32  V270_V360:   9; // 2.70V - 3.60V\r
   UINT32  RESERVED_1:  5; // Reserved\r
   UINT32  AccessMode:  2; // 00b (byte mode), 10b (sector mode) \r
-  UINT32  Busy:        1; // This bit is set to LOW if the card has not finished the power up routine\r
+  UINT32  PowerUp:     1; // This bit is set to LOW if the card has not finished the power up routine\r
 } OCR;\r
 \r
 typedef struct {\r
index 8940f519b749ac1c43aa9fd8b544180cf5caaf46..32a85196ad8228a02ef698050b61d70db61f9d8b 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 *\r
-*  Copyright (c) 2011, ARM Limited. All rights reserved.\r
+*  Copyright (c) 2011-2012, ARM Limited. All rights reserved.\r
 *  \r
 *  This program and the accompanying materials                          \r
 *  are licensed and made available under the terms and conditions of the BSD License         \r
@@ -252,7 +252,7 @@ MmcIdentificationMode (
     DEBUG ((EFI_D_ERROR, "Not a SD2.0 Card\n"));\r
   }\r
 \r
-  // We need to wait for the MMC or SD card is ready => (gCardInfo.OCRData.Busy == 1)\r
+  // We need to wait for the MMC or SD card is ready => (gCardInfo.OCRData.PowerUp == 1)\r
   Timeout = MAX_RETRY_COUNT;\r
   while (Timeout > 0) {\r
     // SD Card or MMC Card ? CMD55 indicates to the card that the next command is an application specific command\r
@@ -287,7 +287,7 @@ MmcIdentificationMode (
     }\r
 \r
     if (!EFI_ERROR(Status)) {\r
-      if (MmcHostInstance->CardInfo.OCRData.Busy == 0) {\r
+      if (!MmcHostInstance->CardInfo.OCRData.PowerUp) {\r
           MicroSecondDelay(1);\r
           Timeout--;\r
       } else {\r