From: Gandikota Sai Phanindra <102981786+saiphanind...@users.noreply.github.com>

Switch to DDR50 speed mode is failing with the existing code flow.
Exiting flow sets Bus width first then bus timing and clock frequency,
with this flow switch to DDR50 speed mode is failing.
After updating the flow to set the bus timing and clock frequency then
bus width resolved the issue and switch to DDR50 is successful.

Cc: Ray Ni <ray...@intel.com>
Cc: Liming Gao <gaolim...@byosoft.com.cn>

Signed-off-by: Sai Phanindra Gandikota <sai.phanindra.gandik...@intel.com>
---
 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c 
b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
index a392a4e31a..2bca6da3db 100644
--- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
+++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
@@ -833,12 +833,12 @@ EmmcSwitchToHighSpeed (
     IsDdr = FALSE;
   }
 
-  Status = EmmcSwitchBusWidth (PciIo, PassThru, Slot, Rca, IsDdr, 
BusMode->BusWidth);
+  Status = EmmcSwitchBusTiming (PciIo, PassThru, Slot, Rca, 
BusMode->DriverStrength, BusMode->BusTiming, BusMode->ClockFreq);
   if (EFI_ERROR (Status)) {
     return Status;
   }
 
-  return EmmcSwitchBusTiming (PciIo, PassThru, Slot, Rca, 
BusMode->DriverStrength, BusMode->BusTiming, BusMode->ClockFreq);
+  return EmmcSwitchBusWidth (PciIo, PassThru, Slot, Rca, IsDdr, 
BusMode->BusWidth);
 }
 
 /**
-- 
2.38.1.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#117626): https://edk2.groups.io/g/devel/message/117626
Mute This Topic: https://groups.io/mt/105458662/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to