Files
edk2/MdeModulePkg
Filip Lewiński f430b8f47a MdeModulePkg/BayhubSdMmcOverrideDxe: add
Replace the direct `mOverride = &BhtOverride` assignment in
InitializeSdMmcPciHcDxe with a standalone DXE driver that installs
gEdkiiSdMmcOverrideProtocolGuid, which SdMmcPciHcDxe already discovers
via LocateProtocol in SdMmcPciHcDriverBindingStart.

The previous integration had two problems. First, assigning mOverride
in the entry point before any DriverBindingStart call meant the
LocateProtocol lookup was always skipped, making it impossible for
any other platform driver to provide an alternative override. Second,
BayhubHost.c depended on SdMmcPciHcDxe-internal headers and helpers
(SdMmcHcOrMmio, SdMmcHcRwMmio, SdMmcHcClockSupply,
SD_MMC_HC_PRIVATE_DATA), preventing it from being compiled as a
separate module.

The new BayhubSdMmcOverrideDxe driver uses EFI_PCI_IO_PROTOCOL
directly for all SDHCI register access and provides BhtHostClockSupply
as a self-contained 400 KHz initialisation routine, removing all
dependencies on SdMmcPciHcDxe internals.

SdMmcPciHcDxe is restored to its upstream state; BayhubHost sources
are removed from it entirely.

Platform firmware that requires BayHub SD/eMMC support should include
both SdMmcPciHcDxe.inf and BayhubSdMmcOverrideDxe.inf in its DSC.

Signed-off-by: Filip Lewinski <filip.lewinski@3mdeb.com>
2026-02-19 10:43:27 +01:00
..
2025-02-07 18:43:32 +00:00