EmbeddedPkg/MmcDxe: Wait for the MMC controller to be in Transfer Mode

The MMC controller might be ready for data but not be in a 'ready' state
to send or receive commands.
This fix waits for the MMC controller to be in the correct state.



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11726 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin
2011-06-03 09:09:18 +00:00
parent ce73d60afb
commit b9d5fe03e6
2 changed files with 17 additions and 5 deletions

View File

@@ -41,6 +41,8 @@
#define MMC_CSD_GET_DEVICESIZE(csd) (((Response[2] >> 30) & 0x3) | ((Response[1] & 0x3FF) << 2))
#define MMC_CSD_GET_DEVICESIZEMULT(csd) ((Response[2] >> 15) & 0x7)
#define MMC_R0_READY_FOR_DATA (1 << 8)
#define MMC_R0_CURRENTSTATE(Response) ((Response[0] >> 9) & 0xF)
#define MMC_R0_STATE_IDLE 0