summaryrefslogtreecommitdiffstats
path: root/EmbeddedPkg/Universal
diff options
context:
space:
mode:
authoroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-15 16:20:55 +0000
committeroliviermartin <oliviermartin@6f19259b-4bc3-4df7-8a09-765794883524>2011-08-15 16:20:55 +0000
commitbb0f9e9ba31f9722faa84c5d57195df013660214 (patch)
tree7ab872ee995b4179924f302000dd9b6932584954 /EmbeddedPkg/Universal
parent36aa561136094f201484fd1fd9ac85ce6de3767a (diff)
downloadedk2-bb0f9e9ba31f9722faa84c5d57195df013660214.tar.gz
edk2-bb0f9e9ba31f9722faa84c5d57195df013660214.tar.bz2
edk2-bb0f9e9ba31f9722faa84c5d57195df013660214.zip
EmbeddedPkg/MmcDxe: Fix the indexes in the response array
The indexes have been reversed compare to the specification which created confusions in some MMC responses. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12132 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EmbeddedPkg/Universal')
-rw-r--r--EmbeddedPkg/Universal/MmcDxe/Mmc.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/EmbeddedPkg/Universal/MmcDxe/Mmc.h b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
index 8858454d09..2904d91484 100644
--- a/EmbeddedPkg/Universal/MmcDxe/Mmc.h
+++ b/EmbeddedPkg/Universal/MmcDxe/Mmc.h
@@ -32,15 +32,15 @@
#define MMC_OCR_POWERUP 0x80000000
-#define MMC_CSD_GET_CCC(Response) (Response[1] >> 20)
-#define MMC_CSD_GET_TRANSPEED(Response) (Response[0] & 0xFF)
-#define MMC_CSD_GET_READBLLEN(Response) ((Response[1] >> 16) & 0xF)
-#define MMC_CSD_GET_WRITEBLLEN(Response) ((Response[3] >> 22) & 0xF)
-#define MMC_CSD_GET_FILEFORMAT(Response) ((Response[3] >> 10) & 0x3)
-#define MMC_CSD_GET_FILEFORMATGRP(Response) ((Response[3] >> 15) & 0x1)
-#define MMC_CSD_GET_DEVICESIZE(csd) (((Response[2] >> 30) & 0x3) | ((Response[1] & 0x3FF) << 2))
+#define MMC_CSD_GET_CCC(Response) (Response[2] >> 20)
+#define MMC_CSD_GET_TRANSPEED(Response) (Response[3] & 0xFF)
+#define MMC_CSD_GET_READBLLEN(Response) ((Response[2] >> 16) & 0xF)
+#define MMC_CSD_GET_WRITEBLLEN(Response) ((Response[0] >> 22) & 0xF)
+#define MMC_CSD_GET_FILEFORMAT(Response) ((Response[0] >> 10) & 0x3)
+#define MMC_CSD_GET_FILEFORMATGRP(Response) ((Response[0] >> 15) & 0x1)
+#define MMC_CSD_GET_DEVICESIZE(csd) (((Response[1] >> 30) & 0x3) | ((Response[2] & 0x3FF) << 2))
#define HC_MMC_CSD_GET_DEVICESIZE(Response) ((Response[1] >> 16) | ((Response[2] & 0x40) << 16));
-#define MMC_CSD_GET_DEVICESIZEMULT(csd) ((Response[2] >> 15) & 0x7)
+#define MMC_CSD_GET_DEVICESIZEMULT(csd) ((Response[1] >> 15) & 0x7)
#define MMC_R0_READY_FOR_DATA (1 << 8)