From 768fe7365f1741489601fc0c81d3863769884129 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sat, 10 Feb 2018 17:05:37 -0600 Subject: [PATCH] EmmcDevice: fix detection on some models From stepan: "This enables eMMC booting when starting edk2 from depthcharge. Previously the driver would bail out with an error while setting the eMMC frequency, because depthcharge has already set up the controller." Also fixed detection on google/lars w/Core-i5 with upstream coreboot + Tianocore payload --- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c index 2d3fb68a4b..ca30e44221 100755 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c @@ -695,7 +695,6 @@ EmmcSwitchClockFreq ( Status = EmmcSendStatus (PassThru, Slot, Rca, &DevStatus); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "EmmcSwitchClockFreq: Send status fails with %r\n", Status)); - return Status; } // // Check the switch operation is really successful or not. @@ -1166,7 +1165,10 @@ EmmcIdentification ( Private->Slot[Slot].CardType = EmmcCardType; Status = EmmcSetBusMode (PciIo, PassThru, Slot, Rca); - - return Status; + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "EmmcSetBusMode: fails with %r\n", Status)); + } + + return EFI_SUCCESS; }