public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH] EmbeddedPkg/MmcDxe: Add non-DDR timing mode support
@ 2017-06-08  8:12 Jun Nie
  2017-06-08  8:39 ` Haojian Zhuang
  2017-06-08 16:51 ` Leif Lindholm
  0 siblings, 2 replies; 5+ messages in thread
From: Jun Nie @ 2017-06-08  8:12 UTC (permalink / raw)
  To: olivier.martin, haojian.zhuang, edk2-devel; +Cc: shawn.guo, jason.liu, Jun Nie

Only DDR mode is support for 8bit mode currently. Add
non-DDR case when configuring ECSD.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jun Nie <jun.nie@linaro.org>
---
 EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
index 574a77e..5c0d7e7 100644
--- a/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
+++ b/EmbeddedPkg/Universal/MmcDxe/MmcIdentification.c
@@ -286,7 +286,10 @@ InitializeEmmcDevice (
     }
     Status = Host->SetIos (Host, BusClockFreq, 8, TimingMode[Idx]);
     if (!EFI_ERROR (Status)) {
-      Status = EmmcSetEXTCSD (MmcHostInstance, EXTCSD_BUS_WIDTH, EMMC_BUS_WIDTH_DDR_8BIT);
+      if (Idx < 2)
+        Status = EmmcSetEXTCSD (MmcHostInstance, EXTCSD_BUS_WIDTH, EMMC_BUS_WIDTH_DDR_8BIT);
+      else
+        Status = EmmcSetEXTCSD (MmcHostInstance, EXTCSD_BUS_WIDTH, EMMC_BUS_WIDTH_8BIT);
       if (EFI_ERROR (Status)) {
         DEBUG ((DEBUG_ERROR, "InitializeEmmcDevice(): Failed to set EXTCSD bus width, Status:%r\n", Status));
       }
-- 
1.9.1



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

end of thread, other threads:[~2017-06-09  3:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-08  8:12 [PATCH] EmbeddedPkg/MmcDxe: Add non-DDR timing mode support Jun Nie
2017-06-08  8:39 ` Haojian Zhuang
2017-06-08 16:55   ` Leif Lindholm
2017-06-09  3:54     ` Jun Nie
2017-06-08 16:51 ` Leif Lindholm

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