summaryrefslogtreecommitdiff
path: root/ArmPkg/Drivers/PL180MciDxe/PL180Mci.c
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-26 16:54:05 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-04-26 16:54:05 +0000
commit50c5f187314c55735135d9c47025286d1c0bf1d5 (patch)
tree49633490504509c463b719be51fe89bc194f780e /ArmPkg/Drivers/PL180MciDxe/PL180Mci.c
parent2b826e7350d7d3dc48be3debbff4e1007282fa33 (diff)
downloadedk2-platforms-50c5f187314c55735135d9c47025286d1c0bf1d5.tar.xz
ArmPkg/PL180MciDxe: Use the new flag MMC_CMD_NO_CRC_RESPONSE
This new MMC flag defines if a CRC is attached to MMC Response. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11587 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPkg/Drivers/PL180MciDxe/PL180Mci.c')
-rw-r--r--ArmPkg/Drivers/PL180MciDxe/PL180Mci.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/ArmPkg/Drivers/PL180MciDxe/PL180Mci.c b/ArmPkg/Drivers/PL180MciDxe/PL180Mci.c
index 250ea8b54d..23bb7d90f9 100644
--- a/ArmPkg/Drivers/PL180MciDxe/PL180Mci.c
+++ b/ArmPkg/Drivers/PL180MciDxe/PL180Mci.c
@@ -118,7 +118,7 @@ MciSendCommand (
}
// Create Command for PL180
- Cmd = INDX(MmcCmd);
+ Cmd = (MMC_GET_INDX(MmcCmd) & INDX_MASK) | MCI_CPSM_ENABLED;
if (MmcCmd & MMC_CMD_WAIT_RESPONSE) {
Cmd |= MCI_CPSM_WAIT_RESPONSE;
}
@@ -150,8 +150,8 @@ MciSendCommand (
//DEBUG ((EFI_D_ERROR, "MciSendCommand(CmdIndex:%d) TIMEOUT! Response:0x%X Status:0x%x\n",(Cmd & 0x3F),MmioRead32(MCI_RESPONSE0_REG),Status));
RetVal = EFI_TIMEOUT;
goto Exit;
- } else if (!((Cmd & 0x3F) == INDX(1)) && (Status & MCI_STATUS_CMD_CMDCRCFAIL)) {
- // The CMD1 does not contain CRC. We should ignore the CRC failed Status.
+ } else if ((!(MmcCmd & MMC_CMD_NO_CRC_RESPONSE)) && (Status & MCI_STATUS_CMD_CMDCRCFAIL)) {
+ // The CMD1 and response type R3 do not contain CRC. We should ignore the CRC failed Status.
RetVal = EFI_CRC_ERROR;
goto Exit;
} else {
@@ -173,7 +173,7 @@ MciSendCommand (
RetVal = EFI_TIMEOUT;
goto Exit;
} else
- if (!((Cmd & 0x3F) == INDX(1)) && (Status & MCI_STATUS_CMD_CMDCRCFAIL)) {
+ if ((!(MmcCmd & MMC_CMD_NO_CRC_RESPONSE)) && (Status & MCI_STATUS_CMD_CMDCRCFAIL)) {
// The CMD1 does not contain CRC. We should ignore the CRC failed Status.
RetVal = EFI_CRC_ERROR;
goto Exit;
@@ -257,8 +257,8 @@ MciReadBlockData (
Buffer[Loop] = MmioRead32(MCI_FIFO_REG);
Loop++;
} else if (Status & MCI_STATUS_CMD_RXDATAAVAILBL) {
- Buffer[Loop] = MmioRead32(MCI_FIFO_REG);
- Loop++;
+ Buffer[Loop] = MmioRead32(MCI_FIFO_REG);
+ Loop++;
} else {
//Check for error conditions and timeouts
if(Status & MCI_STATUS_CMD_DATATIMEOUT) {