According to SD Host Controller 3.0 spec figure 3-10, we have to wait 1ms before checking DAT[3:0] in voltage switch proc
Cc: Hao Wu <hao.a...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Feng Tian <feng.t...@intel.com> --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c | 2 +- MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c index d05eb9e..b2a0857 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c @@ -1123,7 +1123,7 @@ SdCardIdentification ( SdMmcHcInitClockFreq (PciIo, Slot, Private->Capability[Slot]); - gBS->Stall (1); + gBS->Stall (1000); SdMmcHcRwMmio (PciIo, Slot, SD_MMC_HC_PRESENT_STATE, TRUE, sizeof (PresentState), &PresentState); if (((PresentState >> 20) & 0xF) != 0xF) { diff --git a/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c b/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c index 8f7ecf9..cbee947 100644 --- a/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c +++ b/MdeModulePkg/Bus/Sd/SdBlockIoPei/SdHci.c @@ -2832,7 +2832,7 @@ SdPeimIdentification ( SdPeimHcInitClockFreq (Slot->SdHcBase); - MicroSecondDelay (1); + MicroSecondDelay (1000); SdPeimHcRwMmio (Slot->SdHcBase + SD_HC_PRESENT_STATE, TRUE, sizeof (PresentState), &PresentState); if (((PresentState >> 20) & 0xF) != 0xF) { -- 2.7.1.windows.2 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel