summaryrefslogtreecommitdiff
path: root/Platform/BroxtonPlatformPkg/Board
diff options
context:
space:
mode:
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Board')
-rw-r--r--Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c9
-rw-r--r--Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf1
-rw-r--r--Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c28
-rw-r--r--Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf1
-rw-r--r--Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c35
-rw-r--r--Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitMiscs.h7
-rw-r--r--Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf1
-rw-r--r--Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInit.c35
-rw-r--r--Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInitMiscs.h7
-rw-r--r--Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInitPostMem.inf1
10 files changed, 123 insertions, 2 deletions
diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
index 28fc529228..74245de123 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInit.c
@@ -58,13 +58,13 @@ BensonGlacierPostMemInitCallback (
VariableSize = sizeof (SYSTEM_CONFIGURATION);
ZeroMem (&SystemConfiguration, sizeof (SYSTEM_CONFIGURATION));
- (*PeiServices)->LocatePpi (
+ (*PeiServices)->LocatePpi (
(CONST EFI_PEI_SERVICES **)PeiServices,
&gEfiPeiReadOnlyVariable2PpiGuid,
0,
NULL,
(VOID **) &VariableServices
- );
+ );
VariableServices->GetVariable (
VariableServices,
@@ -129,6 +129,11 @@ BensonGlacierPostMemInitCallback (
//
MaxPkgCState = MAX_PKG_CSTATE_C2;
PcdSet8 (PcdMaxPkgCState, (UINT8) MaxPkgCState);
+
+ //
+ // Set PcdeMMCHostMaxSpeed
+ //
+ PcdSet8 (PcdeMMCHostMaxSpeed, (UINT8) (SystemConfiguration.ScceMMCHostMaxSpeed));
//
// Add init steps here
diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf
index e15e612939..0f1d555637 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardInitPostMem.inf
@@ -66,6 +66,7 @@
gPlatformModuleTokenSpaceGuid.PcdSueCreek
gPlatformModuleTokenSpaceGuid.PcdMaxPkgCState
gPlatformModuleTokenSpaceGuid.PcdTi3100AudioCodecEnable
+ gPlatformModuleTokenSpaceGuid.PcdeMMCHostMaxSpeed
[Guids]
gEfiPlatformInfoGuid
diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
index 8051b0021b..4bd93d1670 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInit.c
@@ -59,6 +59,29 @@ LeafHillPostMemInitCallback (
UINT8 ResetType;
UINTN BufferSize;
UINT8 MaxPkgCState;
+ 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,
@@ -106,6 +129,11 @@ LeafHillPostMemInitCallback (
//
MaxPkgCState = MAX_PKG_CSTATE_C2;
PcdSet8 (PcdMaxPkgCState, (UINT8) MaxPkgCState);
+
+ //
+ // Set PcdeMMCHostMaxSpeed
+ //
+ PcdSet8 (PcdeMMCHostMaxSpeed, (UINT8) (SystemConfiguration.ScceMMCHostMaxSpeed));
//
// Add init steps here
diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf
index 526e90357d..0f11b1c11e 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardInitPostMem.inf
@@ -63,6 +63,7 @@
gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid
gPlatformModuleTokenSpaceGuid.PcdSueCreek
gPlatformModuleTokenSpaceGuid.PcdMaxPkgCState
+ gPlatformModuleTokenSpaceGuid.PcdeMMCHostMaxSpeed
[Guids]
gEfiPlatformInfoGuid
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c
index 6ee7e3d3ff..c1ee6b9c98 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInit.c
@@ -59,6 +59,30 @@ MinnowBoard3PostMemInitCallback (
UINT8 ResetType;
UINT8 BtDevice;
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,
@@ -113,6 +137,17 @@ MinnowBoard3PostMemInitCallback (
PcdSetBool (PcdLogoDisplay, TRUE);
//
+ // 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
//
//
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitMiscs.h b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitMiscs.h
index 37faf87493..3392a0341d 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitMiscs.h
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitMiscs.h
@@ -94,6 +94,13 @@
#define SUBSYSTEM_DEVICE_ID 0x1234
#define SUBSYSTEM_SVID_SSID (SUBSYSTEM_VENDOR_ID + (SUBSYSTEM_DEVICE_ID << 16))
+//
+// eMMCHostMaxSpeed identifier.
+//
+#define EMMC_HS400_MODE 0x00
+#define EMMC_HS200_MODE 0x01
+#define EMMC_DDR50_MODE 0x02
+
EFI_STATUS
Minnow3GetPlatformInfoHob (
IN CONST EFI_PEI_SERVICES **PeiServices,
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf
index 665a557696..801c47f141 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardInitPostMem.inf
@@ -62,6 +62,7 @@
gPlatformModuleTokenSpaceGuid.PcdSueCreek
gPlatformModuleTokenSpaceGuid.PcdLogoDisplay
gPlatformModuleTokenSpaceGuid.PcdBtDevice
+ gPlatformModuleTokenSpaceGuid.PcdeMMCHostMaxSpeed
[Guids]
gEfiPlatformInfoGuid
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
//
//
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInitMiscs.h b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInitMiscs.h
index fd4d08646c..c1ced3491e 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInitMiscs.h
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInitMiscs.h
@@ -87,6 +87,13 @@
#define SUBSYSTEM_DEVICE_ID 0x1234
#define SUBSYSTEM_SVID_SSID (SUBSYSTEM_VENDOR_ID + (SUBSYSTEM_DEVICE_ID << 16))
+//
+// eMMCHostMaxSpeed identifier.
+//
+#define EMMC_HS400_MODE 0x00
+#define EMMC_HS200_MODE 0x01
+#define EMMC_DDR50_MODE 0x02
+
EFI_STATUS
Minnow3NextGetPlatformInfoHob (
IN CONST EFI_PEI_SERVICES **PeiServices,
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInitPostMem.inf b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInitPostMem.inf
index be32f93ec1..1a4cc28736 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInitPostMem.inf
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Next/BoardInitPostMem/BoardInitPostMem.inf
@@ -60,6 +60,7 @@
gPlatformModuleTokenSpaceGuid.PcdFabId
gPlatformModuleTokenSpaceGuid.PcdResetType
gPlatformModuleTokenSpaceGuid.PcdBoardVbtFileGuid
+ gPlatformModuleTokenSpaceGuid.PcdeMMCHostMaxSpeed
[Guids]
gEfiPlatformInfoGuid