From: Joe Zhou <shjz...@marvell.com>

This delay is necessary for eMMC reset to working properly.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Joe Zhou <shjz...@marvell.com>
Signed-off-by: Marcin Wojtas <m...@semihalf.com>
---
 MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c 
b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
index ee53145..d4bf2ea 100644
--- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
+++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c
@@ -11,6 +11,7 @@
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 
 **/
+#include <Library/TimerLib.h>
 
 #include "SdMmcPciHcDxe.h"
 
@@ -51,6 +52,8 @@ EmmcReset (
   SdMmcCmdBlk.ResponseType = 0;
   SdMmcCmdBlk.CommandArgument = 0;
 
+  gBS->Stall (1000);
+
   Status = SdMmcPassThruPassThru (PassThru, Slot, &Packet, NULL);
 
   return Status;
-- 
1.8.3.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to