diff options
author | zwei4 <david.wei@intel.com> | 2017-07-13 22:41:16 +0800 |
---|---|---|
committer | zwei4 <david.wei@intel.com> | 2017-07-13 22:41:16 +0800 |
commit | 3bfaf23e95c68881bcbbfedececdece4cdff95f8 (patch) | |
tree | a2fa529e7180bb207fde8f2cca3ba89adaa33184 /Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.c | |
parent | 77de52c8dadec9e995590902dfd55b28ab2465e4 (diff) | |
download | edk2-platforms-3bfaf23e95c68881bcbbfedececdece4cdff95f8.tar.xz |
Multi board support.
Cleanup libraries for multi boards.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: zwei4 <david.wei@intel.com>
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.c')
-rw-r--r-- | Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.c | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.c index eef62d9faf..df11c8bbd9 100644 --- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.c +++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPostMem/BoardGpios.c @@ -13,7 +13,7 @@ **/
-#include <BoardGpios.h>
+#include "BoardGpios.h"
#include <Library/GpioLib.h>
#include <Library/SteppingLib.h>
@@ -30,12 +30,12 @@ **/
EFI_STATUS
-MultiPlatformGpioTableInit (
+BensonMultiPlatformGpioTableInit (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PLATFORM_INFO_HOB *PlatformInfoHob
)
{
- DEBUG ((DEBUG_INFO, "MultiPlatformGpioTableInit()...\n"));
+ DEBUG ((DEBUG_INFO, "BensonMultiPlatformGpioTableInit()...\n"));
DEBUG ((DEBUG_INFO, "PlatformInfoHob->BoardId: 0x%02X\n", PlatformInfoHob->BoardId));
//
@@ -45,16 +45,16 @@ MultiPlatformGpioTableInit ( case BOARD_ID_LFH_CRB:
case BOARD_ID_MINNOW:
case BOARD_ID_BENSON:
- PlatformInfoHob->PlatformGpioSetting_SW = &mBXT_GpioInitData_SW[0];
- PlatformInfoHob->PlatformGpioSetting_W = &mBXT_GpioInitData_W[0];
- PlatformInfoHob->PlatformGpioSetting_NW = &mBXT_GpioInitData_NW[0];
- PlatformInfoHob->PlatformGpioSetting_N = &mBXT_GpioInitData_N[0];
+ PlatformInfoHob->PlatformGpioSetting_SW = &mBenson_GpioInitData_SW[0];
+ PlatformInfoHob->PlatformGpioSetting_W = &mBenson_GpioInitData_W[0];
+ PlatformInfoHob->PlatformGpioSetting_NW = &mBenson_GpioInitData_NW[0];
+ PlatformInfoHob->PlatformGpioSetting_N = &mBenson_GpioInitData_N[0];
break;
default:
- PlatformInfoHob->PlatformGpioSetting_SW = &mBXT_GpioInitData_SW[0];
- PlatformInfoHob->PlatformGpioSetting_W = &mBXT_GpioInitData_W[0];
- PlatformInfoHob->PlatformGpioSetting_NW = &mBXT_GpioInitData_NW[0];
- PlatformInfoHob->PlatformGpioSetting_N = &mBXT_GpioInitData_N[0];
+ PlatformInfoHob->PlatformGpioSetting_SW = &mBenson_GpioInitData_SW[0];
+ PlatformInfoHob->PlatformGpioSetting_W = &mBenson_GpioInitData_W[0];
+ PlatformInfoHob->PlatformGpioSetting_NW = &mBenson_GpioInitData_NW[0];
+ PlatformInfoHob->PlatformGpioSetting_N = &mBenson_GpioInitData_N[0];
break;
}
@@ -67,7 +67,7 @@ MultiPlatformGpioTableInit ( **/
VOID
-SetGpioPadCfgLock (
+BensonSetGpioPadCfgLock (
VOID
)
{
@@ -146,7 +146,7 @@ SetGpioPadCfgLock ( **/
EFI_STATUS
-MultiPlatformGpioProgram (
+BensonMultiPlatformGpioProgram (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PLATFORM_INFO_HOB *PlatformInfoHob
)
@@ -175,7 +175,7 @@ MultiPlatformGpioProgram ( &SystemConfiguration
);
- DEBUG ((DEBUG_INFO, "MultiPlatformGpioProgram()...\n"));
+ DEBUG ((DEBUG_INFO, "BensonMultiPlatformGpioProgram()...\n"));
switch (PlatformInfoHob->BoardId) {
case BOARD_ID_LFH_CRB:
@@ -185,24 +185,24 @@ MultiPlatformGpioProgram ( // PAD programming
//
DEBUG ((DEBUG_INFO, "PAD programming, Board ID: 0x%X\n", PlatformInfoHob->BoardId));
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_N) / sizeof (mBXT_GpioInitData_N[0]), PlatformInfoHob->PlatformGpioSetting_N);
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_NW) / sizeof (mBXT_GpioInitData_NW[0]), PlatformInfoHob->PlatformGpioSetting_NW);
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_W) / sizeof (mBXT_GpioInitData_W[0]), PlatformInfoHob->PlatformGpioSetting_W);
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_SW) / sizeof (mBXT_GpioInitData_SW[0]), PlatformInfoHob->PlatformGpioSetting_SW);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_N) / sizeof (mBenson_GpioInitData_N[0]), PlatformInfoHob->PlatformGpioSetting_N);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_NW) / sizeof (mBenson_GpioInitData_NW[0]), PlatformInfoHob->PlatformGpioSetting_NW);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_W) / sizeof (mBenson_GpioInitData_W[0]), PlatformInfoHob->PlatformGpioSetting_W);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_SW) / sizeof (mBenson_GpioInitData_SW[0]), PlatformInfoHob->PlatformGpioSetting_SW);
if (SystemConfiguration.ScIshEnabled == 0) {
DEBUG ((DEBUG_INFO, "Switch ISH_I2C0 & ISH_I2C1 to LPSS_I2C5 and LPSS I2C6. \n" ));
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_LPSS_I2C) / sizeof (mBXT_GpioInitData_LPSS_I2C[0]), mBXT_GpioInitData_LPSS_I2C);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_LPSS_I2C) / sizeof (mBenson_GpioInitData_LPSS_I2C[0]), mBenson_GpioInitData_LPSS_I2C);
}
break;
default:
//
// PAD programming
//
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_N) / sizeof (mBXT_GpioInitData_N[0]), PlatformInfoHob->PlatformGpioSetting_N);
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_NW) / sizeof (mBXT_GpioInitData_NW[0]), PlatformInfoHob->PlatformGpioSetting_NW);
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_W) / sizeof (mBXT_GpioInitData_W[0]), PlatformInfoHob->PlatformGpioSetting_W);
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_SW) / sizeof (mBXT_GpioInitData_SW[0]), PlatformInfoHob->PlatformGpioSetting_SW);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_N) / sizeof (mBenson_GpioInitData_N[0]), PlatformInfoHob->PlatformGpioSetting_N);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_NW) / sizeof (mBenson_GpioInitData_NW[0]), PlatformInfoHob->PlatformGpioSetting_NW);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_W) / sizeof (mBenson_GpioInitData_W[0]), PlatformInfoHob->PlatformGpioSetting_W);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_SW) / sizeof (mBenson_GpioInitData_SW[0]), PlatformInfoHob->PlatformGpioSetting_SW);
//
// Note1: This BXT BIOS WA needs to be applied after PAD programming to overwrite the GPIO setting to take effect.
@@ -211,7 +211,7 @@ MultiPlatformGpioProgram ( //
if (PlatformInfoHob->FABID == FAB2) {
DEBUG ((DEBUG_INFO, "FAB ID: FAB2\n"));
- GpioPadConfigTable(sizeof(mBXT_GpioInitData_FAB2)/sizeof(mBXT_GpioInitData_FAB2[0]), mBXT_GpioInitData_FAB2);
+ GpioPadConfigTable(sizeof(mBenson_GpioInitData_FAB2)/sizeof(mBenson_GpioInitData_FAB2[0]), mBenson_GpioInitData_FAB2);
}
if (SystemConfiguration.TDO == 2) { //Auto
@@ -224,20 +224,20 @@ MultiPlatformGpioProgram ( if (SystemConfiguration.ScHdAudioIoBufferOwnership == 3) {
DEBUG ((DEBUG_INFO, "HD Audio IO Buffer Ownership is I2S. Change GPIO pin settings for it. \n" ));
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_Audio_SSP6) / sizeof (mBXT_GpioInitData_Audio_SSP6[0]), mBXT_GpioInitData_Audio_SSP6);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_Audio_SSP6) / sizeof (mBenson_GpioInitData_Audio_SSP6[0]), mBenson_GpioInitData_Audio_SSP6);
}
if (SystemConfiguration.PcieRootPortEn[4] == FALSE) {
DEBUG ((DEBUG_INFO, "Onboard LAN disable. \n" ));
- GpioPadConfigTable (sizeof (LomDisableGpio) / sizeof (LomDisableGpio[0]), LomDisableGpio);
+ GpioPadConfigTable (sizeof (BensonLomDisableGpio) / sizeof (BensonLomDisableGpio[0]), BensonLomDisableGpio);
}
if (SystemConfiguration.EPIEnable == 1) {
DEBUG ((DEBUG_INFO, "Overriding GPIO 191 for EPI\n"));
- GpioPadConfigTable (sizeof (mBXT_GpioInitData_EPI_Override) / sizeof (mBXT_GpioInitData_EPI_Override[0]), mBXT_GpioInitData_EPI_Override);
+ GpioPadConfigTable (sizeof (mBenson_GpioInitData_EPI_Override) / sizeof (mBenson_GpioInitData_EPI_Override[0]), mBenson_GpioInitData_EPI_Override);
}
if (SystemConfiguration.GpioLock == TRUE) {
- SetGpioPadCfgLock ();
+ BensonSetGpioPadCfgLock ();
}
DEBUG ((DEBUG_INFO, "No board ID available for this board ....\n"));
break;
@@ -259,19 +259,19 @@ MultiPlatformGpioProgram ( // PAD programming
//
DEBUG ((DEBUG_INFO, "Dump Community pad registers, Board ID: 0x%X\n", PlatformInfoHob->BoardId));
- DumpGpioPadTable (sizeof (mBXT_GpioInitData_N) / sizeof (mBXT_GpioInitData_N[0]), PlatformInfoHob->PlatformGpioSetting_N);
- DumpGpioPadTable (sizeof (mBXT_GpioInitData_NW) / sizeof (mBXT_GpioInitData_NW[0]), PlatformInfoHob->PlatformGpioSetting_NW);
- DumpGpioPadTable (sizeof (mBXT_GpioInitData_W) / sizeof (mBXT_GpioInitData_W[0]), PlatformInfoHob->PlatformGpioSetting_W);
- DumpGpioPadTable (sizeof (mBXT_GpioInitData_SW) / sizeof (mBXT_GpioInitData_SW[0]), PlatformInfoHob->PlatformGpioSetting_SW);
+ DumpGpioPadTable (sizeof (mBenson_GpioInitData_N) / sizeof (mBenson_GpioInitData_N[0]), PlatformInfoHob->PlatformGpioSetting_N);
+ DumpGpioPadTable (sizeof (mBenson_GpioInitData_NW) / sizeof (mBenson_GpioInitData_NW[0]), PlatformInfoHob->PlatformGpioSetting_NW);
+ DumpGpioPadTable (sizeof (mBenson_GpioInitData_W) / sizeof (mBenson_GpioInitData_W[0]), PlatformInfoHob->PlatformGpioSetting_W);
+ DumpGpioPadTable (sizeof (mBenson_GpioInitData_SW) / sizeof (mBenson_GpioInitData_SW[0]), PlatformInfoHob->PlatformGpioSetting_SW);
break;
default:
//
// Dump Community pad registers
//
- DumpGpioPadTable (sizeof (mBXT_GpioInitData_N) / sizeof (mBXT_GpioInitData_N[0]), PlatformInfoHob->PlatformGpioSetting_N);
- DumpGpioPadTable (sizeof (mBXT_GpioInitData_NW) / sizeof (mBXT_GpioInitData_NW[0]), PlatformInfoHob->PlatformGpioSetting_NW);
- DumpGpioPadTable (sizeof (mBXT_GpioInitData_W) / sizeof (mBXT_GpioInitData_W[0]), PlatformInfoHob->PlatformGpioSetting_W);
- DumpGpioPadTable (sizeof (mBXT_GpioInitData_SW) / sizeof (mBXT_GpioInitData_SW[0]), PlatformInfoHob->PlatformGpioSetting_SW);
+ DumpGpioPadTable (sizeof (mBenson_GpioInitData_N) / sizeof (mBenson_GpioInitData_N[0]), PlatformInfoHob->PlatformGpioSetting_N);
+ DumpGpioPadTable (sizeof (mBenson_GpioInitData_NW) / sizeof (mBenson_GpioInitData_NW[0]), PlatformInfoHob->PlatformGpioSetting_NW);
+ DumpGpioPadTable (sizeof (mBenson_GpioInitData_W) / sizeof (mBenson_GpioInitData_W[0]), PlatformInfoHob->PlatformGpioSetting_W);
+ DumpGpioPadTable (sizeof (mBenson_GpioInitData_SW) / sizeof (mBenson_GpioInitData_SW[0]), PlatformInfoHob->PlatformGpioSetting_SW);
break;
}
|