mirror of https://github.com/acidanthera/audk.git
7f3b0bad4b
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> |
||
---|---|---|
.. | ||
AtaAtapiPolicy.h | ||
BootLogo.h | ||
BootLogo2.h | ||
DebuggerConfiguration.h | ||
DisplayProtocol.h | ||
Dpc.h | ||
EbcSimpleDebugger.h | ||
EbcVmTest.h | ||
EsrtManagement.h | ||
FaultTolerantWrite.h | ||
FileExplorer.h | ||
FirmwareManagementProgress.h | ||
FormBrowserEx.h | ||
FormBrowserEx2.h | ||
GenericMemoryTest.h | ||
IoMmu.h | ||
IpmiProtocol.h | ||
LoadPe32Image.h | ||
LockBox.h | ||
NonDiscoverableDevice.h | ||
PlatformLogo.h | ||
PlatformSpecificResetFilter.h | ||
PlatformSpecificResetHandler.h | ||
Print2.h | ||
Ps2Policy.h | ||
SdMmcOverride.h | ||
SmmExitBootServices.h | ||
SmmFaultTolerantWrite.h | ||
SmmFirmwareVolumeBlock.h | ||
SmmLegacyBoot.h | ||
SmmMemoryAttribute.h | ||
SmmReadyToBoot.h | ||
SmmSwapAddressRange.h | ||
SmmVarCheck.h | ||
SmmVariable.h | ||
SwapAddressRange.h | ||
UfsHostController.h | ||
VarCheck.h | ||
VariableLock.h |