mirror of https://github.com/acidanthera/audk.git
EmbeddedPkg/DwEmmcDxe: limit max clock for platform
Some boards may have max clock limitation. Add a Pcd to notify driver. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
This commit is contained in:
parent
d4f6c35c84
commit
d4102f68dc
|
@ -560,6 +560,10 @@ DwEmmcSetIos (
|
|||
EFI_STATUS Status = EFI_SUCCESS;
|
||||
UINT32 Data;
|
||||
|
||||
if ((PcdGet32 (PcdDwEmmcDxeMaxClockFreqInHz) != 0) &&
|
||||
(BusClockFreq > PcdGet32 (PcdDwEmmcDxeMaxClockFreqInHz))) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
if (TimingMode != EMMCBACKWARD) {
|
||||
Data = MmioRead32 (DWEMMC_UHSREG);
|
||||
switch (TimingMode) {
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
[Pcd]
|
||||
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeBaseAddress
|
||||
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeClockFrequencyInHz
|
||||
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeMaxClockFreqInHz
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
|
|
@ -167,6 +167,7 @@
|
|||
# DwEmmc Driver PCDs
|
||||
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeBaseAddress|0x0|UINT32|0x00000035
|
||||
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeClockFrequencyInHz|0x0|UINT32|0x00000036
|
||||
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeMaxClockFreqInHz|0x0|UINT32|0x00000037
|
||||
|
||||
#
|
||||
# Android FastBoot
|
||||
|
|
Loading…
Reference in New Issue