summaryrefslogtreecommitdiff
path: root/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInit.c
diff options
context:
space:
mode:
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInit.c')
-rw-r--r--Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInit.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInit.c
index cf8523adf2..cafc777fba 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInit.c
@@ -58,6 +58,30 @@ MinnowBoard3NextPostMemInitCallback (
UINT8 FabId;
UINT8 ResetType;
UINTN BufferSize;
+ UINT8 MaxSpeed;
+ UINTN VariableSize;
+ EFI_PEI_READ_ONLY_VARIABLE2_PPI *VariableServices;
+ SYSTEM_CONFIGURATION SystemConfiguration;
+
+ VariableSize = sizeof (SYSTEM_CONFIGURATION);
+ ZeroMem (&SystemConfiguration, sizeof (SYSTEM_CONFIGURATION));
+
+ (*PeiServices)->LocatePpi (
+ (CONST EFI_PEI_SERVICES **)PeiServices,
+ &gEfiPeiReadOnlyVariable2PpiGuid,
+ 0,
+ NULL,
+ (VOID **) &VariableServices
+ );
+
+ VariableServices->GetVariable (
+ VariableServices,
+ PLATFORM_SETUP_VARIABLE_NAME,
+ &gEfiSetupVariableGuid,
+ NULL,
+ &VariableSize,
+ &SystemConfiguration
+ );
Status = PeiServicesLocatePpi (
&gBoardPostMemInitDoneGuid,
@@ -98,6 +122,17 @@ MinnowBoard3NextPostMemInitCallback (
PcdSetPtr(PcdBoardVbtFileGuid, &BufferSize, (UINT8 *)&gPeiMinnow3NextVbtGuid);
//
+ // Set PcdeMMCHostMaxSpeed
+ //
+ if ((SystemConfiguration.ScceMMCHostMaxSpeed == 0) || (SystemConfiguration.ScceMMCHostMaxSpeed == 1)) {
+ MaxSpeed = EMMC_HS200_MODE;
+ PcdSet8 (PcdeMMCHostMaxSpeed, (UINT8) MaxSpeed);
+ } else {
+ MaxSpeed = EMMC_DDR50_MODE;
+ PcdSet8 (PcdeMMCHostMaxSpeed, (UINT8) MaxSpeed);
+ }
+
+ //
// Add init steps here
//
//