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
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 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
} OCR;\r
\r
typedef struct {\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
* \r
* This program and the accompanying materials \r
* are licensed and made available under the terms and conditions of the BSD License \r
DEBUG ((EFI_D_ERROR, "Not a SD2.0 Card\n"));\r
}\r
\r
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
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
}\r
\r
if (!EFI_ERROR(Status)) {\r
}\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
MicroSecondDelay(1);\r
Timeout--;\r
} else {\r