public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [edk2-devel] [PATCH] MdeModulePkg/SdMmcPciHcDxe: Update switch to highspeed timing flow
@ 2024-02-06 11:59 Sai Phanindra Gandikota
  0 siblings, 0 replies; 3+ messages in thread
From: Sai Phanindra Gandikota @ 2024-02-06 11:59 UTC (permalink / raw)
  To: devel
  Cc: Gandikota Sai Phanindra, Hao A Wu, Liming Gao,
	Sai Phanindra Gandikota

From: Gandikota Sai Phanindra <102981786+saiphanindrag@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: Hao A Wu <hao.a.wu@intel.com>
Cc: Liming Gao <liming.gao@intel.com>

Signed-off-by: Sai Phanindra Gandikota <sai.phanindra.gandikota@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 (#115171): https://edk2.groups.io/g/devel/message/115171
Mute This Topic: https://groups.io/mt/104198932/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [edk2-devel] [PATCH] MdeModulePkg/SdMmcPciHcDxe: Update switch to highspeed timing flow
@ 2024-04-11  8:21 Sai Phanindra Gandikota
  0 siblings, 0 replies; 3+ messages in thread
From: Sai Phanindra Gandikota @ 2024-04-11  8:21 UTC (permalink / raw)
  To: devel; +Cc: Gandikota Sai Phanindra, Ray Ni, Liming Gao,
	Sai Phanindra Gandikota

From: Gandikota Sai Phanindra <102981786+saiphanindrag@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.ni@intel.com>
Cc: Liming Gao <liming.gao@intel.com>

Signed-off-by: Sai Phanindra Gandikota <sai.phanindra.gandikota@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 (#117622): https://edk2.groups.io/g/devel/message/117622
Mute This Topic: https://groups.io/mt/105458662/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [edk2-devel] [PATCH] MdeModulePkg/SdMmcPciHcDxe: Update switch to highspeed timing flow
@ 2024-04-11  8:40 Sai Phanindra Gandikota
  0 siblings, 0 replies; 3+ messages in thread
From: Sai Phanindra Gandikota @ 2024-04-11  8:40 UTC (permalink / raw)
  To: devel; +Cc: Gandikota Sai Phanindra, Ray Ni, Liming Gao,
	Sai Phanindra Gandikota

From: Gandikota Sai Phanindra <102981786+saiphanindrag@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.ni@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>

Signed-off-by: Sai Phanindra Gandikota <sai.phanindra.gandikota@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/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-11  8:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-11  8:21 [edk2-devel] [PATCH] MdeModulePkg/SdMmcPciHcDxe: Update switch to highspeed timing flow Sai Phanindra Gandikota
  -- strict thread matches above, loose matches on Subject: below --
2024-04-11  8:40 Sai Phanindra Gandikota
2024-02-06 11:59 Sai Phanindra Gandikota

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox