\r
#define MMC_OCR_POWERUP 0x80000000\r
\r
-#define MMC_CSD_GET_CCC(Response) (Response[1] >> 20)\r
-#define MMC_CSD_GET_TRANSPEED(Response) (Response[0] & 0xFF)\r
-#define MMC_CSD_GET_READBLLEN(Response) ((Response[1] >> 16) & 0xF)\r
-#define MMC_CSD_GET_WRITEBLLEN(Response) ((Response[3] >> 22) & 0xF)\r
-#define MMC_CSD_GET_FILEFORMAT(Response) ((Response[3] >> 10) & 0x3)\r
-#define MMC_CSD_GET_FILEFORMATGRP(Response) ((Response[3] >> 15) & 0x1)\r
-#define MMC_CSD_GET_DEVICESIZE(csd) (((Response[2] >> 30) & 0x3) | ((Response[1] & 0x3FF) << 2))\r
-#define MMC_CSD_GET_DEVICESIZEMULT(csd) ((Response[2] >> 15) & 0x7)\r
+#define MMC_CSD_GET_CCC(Response) (Response[2] >> 20)\r
+#define MMC_CSD_GET_TRANSPEED(Response) (Response[3] & 0xFF)\r
+#define MMC_CSD_GET_READBLLEN(Response) ((Response[2] >> 16) & 0xF)\r
+#define MMC_CSD_GET_WRITEBLLEN(Response) ((Response[0] >> 22) & 0xF)\r
+#define MMC_CSD_GET_FILEFORMAT(Response) ((Response[0] >> 10) & 0x3)\r
+#define MMC_CSD_GET_FILEFORMATGRP(Response) ((Response[0] >> 15) & 0x1)\r
+#define MMC_CSD_GET_DEVICESIZE(csd) (((Response[1] >> 30) & 0x3) | ((Response[2] & 0x3FF) << 2))\r
+#define HC_MMC_CSD_GET_DEVICESIZE(Response) ((Response[1] >> 16) | ((Response[2] & 0x40) << 16));\r
+#define MMC_CSD_GET_DEVICESIZEMULT(csd) ((Response[1] >> 15) & 0x7)\r
\r
#define MMC_R0_READY_FOR_DATA (1 << 8)\r
\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
IN EFI_BLOCK_IO_PROTOCOL *This\r
);\r
\r
+EFI_STATUS InitializeMmcDevice (\r
+ IN MMC_HOST_INSTANCE *MmcHost\r
+ );\r
+\r
+VOID\r
+EFIAPI\r
+CheckCardsCallback (\r
+ IN EFI_EVENT Event,\r
+ IN VOID *Context\r
+ );\r
+\r
#endif\r