Re: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3] GPIO clean up.

2017-04-13 Thread Wei, David
Reviewed-by: zwei4  


Thanks,
David  Wei 


-Original Message-
From: Lu, ShifeiX A 
Sent: Thursday, April 13, 2017 5:20 PM
To: edk2-devel@lists.01.org
Cc: Wei, David 
Subject: [Patch][edk2-platforms/devel-MinnowBoard3] GPIO clean up.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex 
---
 .../MinnowBoard3/BoardInitPostMem/BoardGpios.c |  12 +-
 .../MinnowBoard3/BoardInitPostMem/BoardGpios.h | 216 +++--
 2 files changed, 69 insertions(+), 159 deletions(-)

diff --git 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.c 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.c
index 5d27656..7e7c327 100644
--- 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.c
+++ 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.c
@@ -1,7 +1,7 @@
 /** @file
   Gpio setting for multiplatform.
 
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -188,10 +188,6 @@ MultiPlatformGpioProgram (
   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 (mBXT_GpioInitData_N_LH) / sizeof 
(mBXT_GpioInitData_N_LH[0]), mBXT_GpioInitData_N_LH);
-  GpioPadConfigTable (sizeof (mBXT_GpioInitData_SW_LH) / sizeof 
(mBXT_GpioInitData_SW_LH[0]), mBXT_GpioInitData_SW_LH);
-  GpioPadConfigTable (sizeof (mBXT_GpioInitData_W_LH) / sizeof 
(mBXT_GpioInitData_W_LH[0]), mBXT_GpioInitData_W_LH);
-  GpioPadConfigTable (sizeof (mBXT_GpioInitData_NW_LH) / sizeof 
(mBXT_GpioInitData_NW_LH[0]), mBXT_GpioInitData_NW_LH);
 
   if (SystemConfiguration.ScIshEnabled == 0) {
 DEBUG ((DEBUG_INFO, "Switch ISH_I2C0 & ISH_I2C1 to LPSS_I2C5 and LPSS 
I2C6. \n" ));
@@ -262,9 +258,9 @@ MultiPlatformGpioProgram (
   //
   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_LH) / sizeof 
(mBXT_GpioInitData_NW_LH[0]), PlatformInfoHob->PlatformGpioSetting_NW);
-  DumpGpioPadTable (sizeof (mBXT_GpioInitData_W_LH) / sizeof 
(mBXT_GpioInitData_W_LH[0]), PlatformInfoHob->PlatformGpioSetting_W);
-  DumpGpioPadTable (sizeof (mBXT_GpioInitData_SW_LH) / sizeof 
(mBXT_GpioInitData_SW_LH[0]), PlatformInfoHob->PlatformGpioSetting_SW);
+  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);
   break;
 default:
 //
diff --git 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
index 6bc1619..0928e16 100644
--- 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
+++ 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
@@ -1,7 +1,7 @@
 /** @file
   GPIO setting for Broxton.
 
-  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -72,16 +72,20 @@ BXT_GPIO_PAD_INIT  mBXT_GpioInitData_N[] =
   BXT_GPIO_PAD_CONF(L"GPIO_6",   M1   ,NA,  NA   ,  NA 
   ,   NA   , Wake_Disabled, P_20K_L,   NA,NA,   HizRx0I,   SAME, 
GPIO_PADBAR+0x0030,  NORTH),//Mux with DISP1_RST_N based on the SW3 switch
   BXT_GPIO_PAD_CONF(L"GPIO_7",   M1   ,NA,  NA   ,  NA 
   ,   NA   , Wake_Disabled, P_20K_L,   NA,NA,   HizRx0I,   SAME, 
GPIO_PADBAR+0x0038,  NORTH),//Mux with DISP1_TOUCH_INT_N based on the SW3 switch
   BXT_GPIO_PAD_CONF(L"GPIO_8",   M1   ,NA,  NA   ,  NA 
   ,   NA   , Wake_Disabled, P_20K_L,   NA,NA,   HizRx0I,   SAME, 
GPIO_PADBAR+0x0040,  

[edk2] [Patch][edk2-platforms/devel-MinnowBoard3] GPIO clean up.

2017-04-13 Thread lushifex
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex 
---
 .../MinnowBoard3/BoardInitPostMem/BoardGpios.c |  12 +-
 .../MinnowBoard3/BoardInitPostMem/BoardGpios.h | 216 +++--
 2 files changed, 69 insertions(+), 159 deletions(-)

diff --git 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.c 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.c
index 5d27656..7e7c327 100644
--- 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.c
+++ 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.c
@@ -1,7 +1,7 @@
 /** @file
   Gpio setting for multiplatform.
 
-  Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -188,10 +188,6 @@ MultiPlatformGpioProgram (
   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 (mBXT_GpioInitData_N_LH) / sizeof 
(mBXT_GpioInitData_N_LH[0]), mBXT_GpioInitData_N_LH);
-  GpioPadConfigTable (sizeof (mBXT_GpioInitData_SW_LH) / sizeof 
(mBXT_GpioInitData_SW_LH[0]), mBXT_GpioInitData_SW_LH);
-  GpioPadConfigTable (sizeof (mBXT_GpioInitData_W_LH) / sizeof 
(mBXT_GpioInitData_W_LH[0]), mBXT_GpioInitData_W_LH);
-  GpioPadConfigTable (sizeof (mBXT_GpioInitData_NW_LH) / sizeof 
(mBXT_GpioInitData_NW_LH[0]), mBXT_GpioInitData_NW_LH);
 
   if (SystemConfiguration.ScIshEnabled == 0) {
 DEBUG ((DEBUG_INFO, "Switch ISH_I2C0 & ISH_I2C1 to LPSS_I2C5 and LPSS 
I2C6. \n" ));
@@ -262,9 +258,9 @@ MultiPlatformGpioProgram (
   //
   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_LH) / sizeof 
(mBXT_GpioInitData_NW_LH[0]), PlatformInfoHob->PlatformGpioSetting_NW);
-  DumpGpioPadTable (sizeof (mBXT_GpioInitData_W_LH) / sizeof 
(mBXT_GpioInitData_W_LH[0]), PlatformInfoHob->PlatformGpioSetting_W);
-  DumpGpioPadTable (sizeof (mBXT_GpioInitData_SW_LH) / sizeof 
(mBXT_GpioInitData_SW_LH[0]), PlatformInfoHob->PlatformGpioSetting_SW);
+  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);
   break;
 default:
 //
diff --git 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
index 6bc1619..0928e16 100644
--- 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
+++ 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
@@ -1,7 +1,7 @@
 /** @file
   GPIO setting for Broxton.
 
-  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD 
License
@@ -72,16 +72,20 @@ BXT_GPIO_PAD_INIT  mBXT_GpioInitData_N[] =
   BXT_GPIO_PAD_CONF(L"GPIO_6",   M1   ,NA,  NA   ,  NA 
   ,   NA   , Wake_Disabled, P_20K_L,   NA,NA,   HizRx0I,   SAME, 
GPIO_PADBAR+0x0030,  NORTH),//Mux with DISP1_RST_N based on the SW3 switch
   BXT_GPIO_PAD_CONF(L"GPIO_7",   M1   ,NA,  NA   ,  NA 
   ,   NA   , Wake_Disabled, P_20K_L,   NA,NA,   HizRx0I,   SAME, 
GPIO_PADBAR+0x0038,  NORTH),//Mux with DISP1_TOUCH_INT_N based on the SW3 switch
   BXT_GPIO_PAD_CONF(L"GPIO_8",   M1   ,NA,  NA   ,  NA 
   ,   NA   , Wake_Disabled, P_20K_L,   NA,NA,   HizRx0I,   SAME, 
GPIO_PADBAR+0x0040,  NORTH),//Mux with DISP1_TOUCH_RST_N based on the SW3 switch
-  BXT_GPIO_PAD_CONF(L"GPIO_9",   M0   ,GPI   ,  NA   ,  NA 
   ,   Level, Wake_Disabled, P_20K_L, Inverted,IOAPIC,   TxDRxE , NA, 
GPIO_PADBAR+0x0048,  NORTH),//Feature:Interrupt  Net in Sch: 
SPI_TPM_HDR_IRQ_N
-  

Re: [edk2] [Patch][edk2-platforms/devel-MinnowBoard3] GPIO clean up.

2017-04-12 Thread Wei, David
Reviewed-by: zwei4  

Thanks,
David  Wei 

-Original Message-
From: Lu, ShifeiX A 
Sent: Thursday, April 13, 2017 11:31 AM
To: edk2-devel@lists.01.org
Cc: Wei, David 
Subject: [Patch][edk2-platforms/devel-MinnowBoard3] GPIO clean up.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex 
---
 .../Board/LeafHill/BoardInitPostMem/BoardGpios.h  | 8 
 .../Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h  | 8 
 2 files changed, 16 deletions(-)

diff --git 
a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardGpios.h 
b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardGpios.h
index e0c0554..9777d75 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardGpios.h
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardGpios.h
@@ -328,14 +328,6 @@ BXT_GPIO_PAD_INIT  mBXT_GpioInitData_Audio_SSP6 []=
   BXT_GPIO_PAD_CONF(L"GPIO_192 DBI_SCL", M0  , HI_Z  ,GPIO_D,   HI 
   ,   NA  ,  Wake_Disabled,  P_2K_H,   NA,NA,NA,  NA  ,  
GPIO_PADBAR+0x0028,  NORTHWEST),//Feature: Codec Power Down PD Net in Sch: 
SOC_CODEC_PD_N
 };
 
-BXT_GPIO_PAD_INIT  mBXT_GpioInitData_N_RVP2[] =
-{
-  //
-  //  Group Pin#:  pad_name,
PMode,GPIO_Config,HostSw,GPO_STATE,INT_Trigger,  Wake_Enabled 
,Term_H_L,Inverted, GPI_ROUT, IOSstae, IOSTerm, MMIO_Offset  ,Community
-  //
-  BXT_GPIO_PAD_CONF(L"GPIO_33",  M0   ,GPI   ,  NA   ,  NA 
   ,   Edge , Wake_Disabled, P_20K_L,   NA,IOAPIC,IOS_Masked,   SAME, 
GPIO_PADBAR+0x0108,  NORTH),//Feature: Interrput  Net in Sch: 
PMIC_IRQ_R_N
-};
-
 BXT_GPIO_PAD_INIT  mBXT_GpioInitData_FAB2[] =
 {
   //
diff --git 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
index f7e6d09..6bc1619 100644
--- 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
+++ 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
@@ -326,14 +326,6 @@ BXT_GPIO_PAD_INIT  mBXT_GpioInitData_Audio_SSP6 []=
   BXT_GPIO_PAD_CONF(L"GPIO_192 DBI_SCL", M0  , HI_Z  ,GPIO_D,   HI 
   ,   NA  ,  Wake_Disabled,  P_2K_H,   NA,NA,NA,  NA  ,  
GPIO_PADBAR+0x0028,  NORTHWEST),//Feature: Codec Power Down PD Net in Sch: 
SOC_CODEC_PD_N
 };
 
-BXT_GPIO_PAD_INIT  mBXT_GpioInitData_N_RVP2[] =
-{
-  //
-  //  Group Pin#:  pad_name,
PMode,GPIO_Config,HostSw,GPO_STATE,INT_Trigger,  Wake_Enabled 
,Term_H_L,Inverted, GPI_ROUT, IOSstae, IOSTerm, MMIO_Offset  ,Community
-  //
-  BXT_GPIO_PAD_CONF(L"GPIO_33",  M0   ,GPI   ,  NA   ,  NA 
   ,   Edge , Wake_Disabled, P_20K_L,   NA,IOAPIC,IOS_Masked,   SAME, 
GPIO_PADBAR+0x0108,  NORTH),//Feature: Interrput  Net in Sch: 
PMIC_IRQ_R_N
-};
-
 BXT_GPIO_PAD_INIT  mBXT_GpioInitData_FAB2[] =
 {
   //
-- 
2.7.0.windows.1


___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel


[edk2] [Patch][edk2-platforms/devel-MinnowBoard3] GPIO clean up.

2017-04-12 Thread lushifex
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: lushifex 
---
 .../Board/LeafHill/BoardInitPostMem/BoardGpios.h  | 8 
 .../Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h  | 8 
 2 files changed, 16 deletions(-)

diff --git 
a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardGpios.h 
b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardGpios.h
index e0c0554..9777d75 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardGpios.h
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPostMem/BoardGpios.h
@@ -328,14 +328,6 @@ BXT_GPIO_PAD_INIT  mBXT_GpioInitData_Audio_SSP6 []=
   BXT_GPIO_PAD_CONF(L"GPIO_192 DBI_SCL", M0  , HI_Z  ,GPIO_D,   HI 
   ,   NA  ,  Wake_Disabled,  P_2K_H,   NA,NA,NA,  NA  ,  
GPIO_PADBAR+0x0028,  NORTHWEST),//Feature: Codec Power Down PD Net in Sch: 
SOC_CODEC_PD_N
 };
 
-BXT_GPIO_PAD_INIT  mBXT_GpioInitData_N_RVP2[] =
-{
-  //
-  //  Group Pin#:  pad_name,
PMode,GPIO_Config,HostSw,GPO_STATE,INT_Trigger,  Wake_Enabled 
,Term_H_L,Inverted, GPI_ROUT, IOSstae, IOSTerm, MMIO_Offset  ,Community
-  //
-  BXT_GPIO_PAD_CONF(L"GPIO_33",  M0   ,GPI   ,  NA   ,  NA 
   ,   Edge , Wake_Disabled, P_20K_L,   NA,IOAPIC,IOS_Masked,   SAME, 
GPIO_PADBAR+0x0108,  NORTH),//Feature: Interrput  Net in Sch: 
PMIC_IRQ_R_N
-};
-
 BXT_GPIO_PAD_INIT  mBXT_GpioInitData_FAB2[] =
 {
   //
diff --git 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
index f7e6d09..6bc1619 100644
--- 
a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
+++ 
b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPostMem/BoardGpios.h
@@ -326,14 +326,6 @@ BXT_GPIO_PAD_INIT  mBXT_GpioInitData_Audio_SSP6 []=
   BXT_GPIO_PAD_CONF(L"GPIO_192 DBI_SCL", M0  , HI_Z  ,GPIO_D,   HI 
   ,   NA  ,  Wake_Disabled,  P_2K_H,   NA,NA,NA,  NA  ,  
GPIO_PADBAR+0x0028,  NORTHWEST),//Feature: Codec Power Down PD Net in Sch: 
SOC_CODEC_PD_N
 };
 
-BXT_GPIO_PAD_INIT  mBXT_GpioInitData_N_RVP2[] =
-{
-  //
-  //  Group Pin#:  pad_name,
PMode,GPIO_Config,HostSw,GPO_STATE,INT_Trigger,  Wake_Enabled 
,Term_H_L,Inverted, GPI_ROUT, IOSstae, IOSTerm, MMIO_Offset  ,Community
-  //
-  BXT_GPIO_PAD_CONF(L"GPIO_33",  M0   ,GPI   ,  NA   ,  NA 
   ,   Edge , Wake_Disabled, P_20K_L,   NA,IOAPIC,IOS_Masked,   SAME, 
GPIO_PADBAR+0x0108,  NORTH),//Feature: Interrput  Net in Sch: 
PMIC_IRQ_R_N
-};
-
 BXT_GPIO_PAD_INIT  mBXT_GpioInitData_FAB2[] =
 {
   //
-- 
2.7.0.windows.1


___
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel