summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2022-02-24 00:58:51 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-03-17 16:13:22 +0000
commitb429959bb6732380a3747eff4ba3936a2c37600d (patch)
tree6366cfdbed9a43565cb76763128b56388f4db636 /MdeModulePkg/Bus
parent411b3ff6ddb4042374a6e61285dac9f5a227f652 (diff)
downloadedk2-b429959bb6732380a3747eff4ba3936a2c37600d.tar.gz
edk2-b429959bb6732380a3747eff4ba3936a2c37600d.tar.bz2
edk2-b429959bb6732380a3747eff4ba3936a2c37600d.zip
MdeModulePkg/SdMmcPciHcDxe: Make timeout for SD card configurable
The default 1s timeout can delay boot splash on some hardware with no benefit. Cc: Hao A Wu <hao.a.wu@intel.com> Cc: Ray Ni <ray.ni@intel.com> Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Signed-off-by: Matt DeVillier <matt.devillier@gmail.com> Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-by: Hao A Wu <hao.a.wu@intel.com>
Diffstat (limited to 'MdeModulePkg/Bus')
-rw-r--r--MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h3
-rw-r--r--MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf4
2 files changed, 6 insertions, 1 deletions
diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h
index 85e09cf114..b76c7cffa2 100644
--- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h
+++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h
@@ -24,6 +24,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
#include <Library/MemoryAllocationLib.h>
#include <Library/UefiLib.h>
#include <Library/DevicePathLib.h>
+#include <Library/PcdLib.h>
#include <Protocol/DevicePath.h>
#include <Protocol/PciIo.h>
@@ -49,7 +50,7 @@ extern EDKII_SD_MMC_OVERRIDE *mOverride;
//
// Generic time out value, 1 microsecond as unit.
//
-#define SD_MMC_HC_GENERIC_TIMEOUT 1 * 1000 * 1000
+#define SD_MMC_HC_GENERIC_TIMEOUT (PcdGet32 (PcdSdMmcGenericTimeoutValue))
//
// SD/MMC async transfer timer interval, set by experience.
diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
index 453ecde7fd..e502443ddd 100644
--- a/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
+++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.inf
@@ -56,6 +56,7 @@
BaseLib
UefiDriverEntryPoint
DebugLib
+ PcdLib
[Protocols]
gEdkiiSdMmcOverrideProtocolGuid ## SOMETIMES_CONSUMES
@@ -68,3 +69,6 @@
[UserExtensions.TianoCore."ExtraFiles"]
SdMmcPciHcDxeExtra.uni
+
+[Pcd]
+ gEfiMdeModulePkgTokenSpaceGuid.PcdSdMmcGenericTimeoutValue ## CONSUMES