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;
|
EFI_STATUS Status = EFI_SUCCESS;
|
||||||
UINT32 Data;
|
UINT32 Data;
|
||||||
|
|
||||||
|
if ((PcdGet32 (PcdDwEmmcDxeMaxClockFreqInHz) != 0) &&
|
||||||
|
(BusClockFreq > PcdGet32 (PcdDwEmmcDxeMaxClockFreqInHz))) {
|
||||||
|
return EFI_UNSUPPORTED;
|
||||||
|
}
|
||||||
if (TimingMode != EMMCBACKWARD) {
|
if (TimingMode != EMMCBACKWARD) {
|
||||||
Data = MmioRead32 (DWEMMC_UHSREG);
|
Data = MmioRead32 (DWEMMC_UHSREG);
|
||||||
switch (TimingMode) {
|
switch (TimingMode) {
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
[Pcd]
|
[Pcd]
|
||||||
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeBaseAddress
|
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeBaseAddress
|
||||||
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeClockFrequencyInHz
|
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeClockFrequencyInHz
|
||||||
|
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeMaxClockFreqInHz
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
TRUE
|
||||||
|
|
|
@ -167,6 +167,7 @@
|
||||||
# DwEmmc Driver PCDs
|
# DwEmmc Driver PCDs
|
||||||
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeBaseAddress|0x0|UINT32|0x00000035
|
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeBaseAddress|0x0|UINT32|0x00000035
|
||||||
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeClockFrequencyInHz|0x0|UINT32|0x00000036
|
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeClockFrequencyInHz|0x0|UINT32|0x00000036
|
||||||
|
gEmbeddedTokenSpaceGuid.PcdDwEmmcDxeMaxClockFreqInHz|0x0|UINT32|0x00000037
|
||||||
|
|
||||||
#
|
#
|
||||||
# Android FastBoot
|
# Android FastBoot
|
||||||
|
|
Loading…
Reference in New Issue