EmbeddedPkg/MmcDxe: Avoid nanosecond delay when command succeeds

Check response just after receiving it to avoid the delay.

Signed-off-by: Olivier Martin <olivier.martin@arm.com>



git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13584 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
oliviermartin 2012-08-02 10:14:52 +00:00
parent 492e34a590
commit 699e34adeb

View File

@ -629,6 +629,9 @@ MmcIoBlocks (
Status = MmcHost->SendCommand (MmcHost, MMC_CMD13, CmdArg);
if (!EFI_ERROR(Status)) {
MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_R1, Response);
if ((Response[0] & MMC_R0_READY_FOR_DATA)) {
break; // Prevents delay once finished
}
}
NanoSecondDelay(100);
Timeout--;