mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-26 07:04:28 +02:00
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:
parent
492e34a590
commit
699e34adeb
@ -629,6 +629,9 @@ MmcIoBlocks (
|
|||||||
Status = MmcHost->SendCommand (MmcHost, MMC_CMD13, CmdArg);
|
Status = MmcHost->SendCommand (MmcHost, MMC_CMD13, CmdArg);
|
||||||
if (!EFI_ERROR(Status)) {
|
if (!EFI_ERROR(Status)) {
|
||||||
MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_R1, Response);
|
MmcHost->ReceiveResponse (MmcHost, MMC_RESPONSE_TYPE_R1, Response);
|
||||||
|
if ((Response[0] & MMC_R0_READY_FOR_DATA)) {
|
||||||
|
break; // Prevents delay once finished
|
||||||
|
}
|
||||||
}
|
}
|
||||||
NanoSecondDelay(100);
|
NanoSecondDelay(100);
|
||||||
Timeout--;
|
Timeout--;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user