diff options
-rw-r--r-- | EmbeddedPkg/Universal/MmcDxe/Mmc.h | 1 | ||||
-rw-r--r-- | EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c | 5 |
2 files changed, 3 insertions, 3 deletions
diff --git a/EmbeddedPkg/Universal/MmcDxe/Mmc.h b/EmbeddedPkg/Universal/MmcDxe/Mmc.h index d570be299f..8858454d09 100644 --- a/EmbeddedPkg/Universal/MmcDxe/Mmc.h +++ b/EmbeddedPkg/Universal/MmcDxe/Mmc.h @@ -39,6 +39,7 @@ #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 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_R0_READY_FOR_DATA (1 << 8)
diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c b/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c index 38998c893f..8fd86f7244 100644 --- a/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c +++ b/EmbeddedPkg/Universal/MmcDxe/MmcBlockIo.c @@ -464,9 +464,8 @@ MmcIoBlocks ( PrintCSD(Response);
if (MmcHostInstance->CardInfo.CardType == SD_CARD_2_HIGH) {
- ASSERT(0); //TODO: Implementation needed
- CardSize = MMC_CSD_GET_DEVICESIZE(Response);
- NumBlocks = ((CardSize + 1) * 1024);;
+ CardSize = HC_MMC_CSD_GET_DEVICESIZE(Response);
+ NumBlocks = ((CardSize + 1) * 1024);
BlockSize = 1 << MMC_CSD_GET_READBLLEN(Response);
} else {
CardSize = MMC_CSD_GET_DEVICESIZE(Response);
|