audk/MdeModulePkg/Bus/Pci
Marcin Wojtas 7f3b0bad4b MdeModulePkg/SdMmcPciHcDxe: Allow overriding base clock frequency
Some SdMmc host controllers are run by clocks with different
frequency than it is reflected in Capabilities Register 1.
It is allowed by SDHCI specification ver. 4.2 - if BaseClkFreq
field value of the Capability Register 1 is zero, the clock
frequency must be obtained via another method.

Because the bitfield is only 8 bits wide, a maximum value
that could be obtained from hardware is 255MHz.
In case the actual frequency exceeds 255MHz, the 8-bit BaseClkFreq
member of SD_MMC_HC_SLOT_CAP structure occurs to be not sufficient
to be used for setting the clock speed in SdMmcHcClockSupply
function.

This patch adds new UINT32 array ('BaseClkFreq[]') to
SD_MMC_HC_PRIVATE_DATA structure for specifying
the input clock speed for each slot of the host controller.
All routines that are used for clock configuration are
updated accordingly.

This patch also adds new IN OUT BaseClockFreq field
in the Capability callback of the SdMmcOverride,
protocol which allows to update BaseClkFreq value.

The patch reuses original commit from edk2-platforms:
20f6f144d3a8 ("Marvell/Drivers: XenonDxe: Allow overriding base clock
frequency")

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Marcin Wojtas <mw@semihalf.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2018-11-20 13:46:57 +08:00
..
EhciDxe Revert "EhciDxe: Use common buffer for AsyncInterruptTransfer" 2018-11-07 22:48:01 +08:00
EhciPei MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
IdeBusPei MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
IncompatiblePciDeviceSupportDxe MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
NonDiscoverablePciDeviceDxe MdeModulePkg/NonDiscoverablePciDeviceDxe: expose unique B/D/F identifiers 2018-10-10 11:14:29 +02:00
NvmExpressDxe MdeModulePkg/NvmExpressDxe: Refine PassThru IO queue creation behavior 2018-10-25 12:41:37 +08:00
NvmExpressPei MdeModulePkg/NvmExpressPei: Refine data buffer & len check in PassThru 2018-11-13 20:54:44 +08:00
PciBusDxe MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
PciHostBridgeDxe MdeModulePkg/PciHostBridge: Move declaration of mIoMmu to header file 2018-09-26 12:12:53 +08:00
PciSioSerialDxe MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
SataControllerDxe MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
SdMmcPciHcDxe MdeModulePkg/SdMmcPciHcDxe: Allow overriding base clock frequency 2018-11-20 13:46:57 +08:00
SdMmcPciHcPei MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
UfsPciHcDxe MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
UfsPciHcPei MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
UhciDxe MdeModulePkg/Usb: Make sure data from HW is no more than expected 2018-10-17 11:03:58 +08:00
UhciPei MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00
XhciDxe Revert "XhciDxe: Use common buffer for AsyncInterruptTransfer" 2018-11-07 22:48:07 +08:00
XhciPei MdeModulePkg Xhci: Handle value 5 in Port Speed field of PORTSC 2018-10-23 11:17:32 +08:00