[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 02/1 BroxtonPlatformPkg: Code cleanup

Guo, Mang posted 1 patch 7 years, 4 months ago
Failed in applying to current master (apply log)
.../BensonGlacier/BoardInitPreMem/BoardInit.c      | 11 +------
.../BensonGlacier/BoardInitPreMem/BoardInit.h      | 16 +++++++--
.../Common/Acpi/AcpiTablesPCAT/AcpiTablePlatform.h |  4 +--
.../Common/Acpi/AcpiTablesPCAT/ScLpss.asl          | 38 +---------------------
.../PlatformPreMemPei/BoardGpiosPreMem.c           |  4 +--
.../PlatformPreMemPei/PlatformInitPreMem.c         |  2 +-
.../PlatformSetupDxe/PlatformSetupDxe.c            |  1 +
7 files changed, 22 insertions(+), 54 deletions(-)
[edk2] [Patch][edk2-platforms/devel-MinnowBoard3-UDK2017 02/1 BroxtonPlatformPkg: Code cleanup
Posted by Guo, Mang 7 years, 4 months ago
Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Guo Mang <mang.guo@intel.com>
---
 .../BensonGlacier/BoardInitPreMem/BoardInit.c      | 11 +------
 .../BensonGlacier/BoardInitPreMem/BoardInit.h      | 16 +++++++--
 .../Common/Acpi/AcpiTablesPCAT/AcpiTablePlatform.h |  4 +--
 .../Common/Acpi/AcpiTablesPCAT/ScLpss.asl          | 38 +---------------------
 .../PlatformPreMemPei/BoardGpiosPreMem.c           |  4 +--
 .../PlatformPreMemPei/PlatformInitPreMem.c         |  2 +-
 .../PlatformSetupDxe/PlatformSetupDxe.c            |  1 +
 7 files changed, 22 insertions(+), 54 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c
index 122ed9a..24cfaf3 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.c
@@ -13,16 +13,7 @@
 
 **/
 
-#include <PiPei.h>
-#include <Library/PeiServicesLib.h>
-#include <Library/PcdLib.h>
-#include <Library/BaseMemoryLib.h>
-#include <Library/DebugLib.h>
-#include <Guid/PlatformInfo_Aplk.h>
-#include <Ppi/BoardInitSignalling.h>
 #include "BoardInit.h"
-#include "PlatformId.h"
-#include "BoardInitMiscs.h"
 
 EFI_STATUS
 EFIAPI
@@ -60,7 +51,7 @@ BensonGlacierPreMemInit (
   UINT8                            FabId;
 
   BoardId = 0;
-  FabId = 0;
+  FabId   = 0;
   Status = PeiServicesLocatePpi (
              &gBoardPreMemInitDoneGuid,
              0,
diff --git a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.h b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.h
index 0a549c2..3153776 100644
--- a/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.h
+++ b/Platform/BroxtonPlatformPkg/Board/BensonGlacier/BoardInitPreMem/BoardInit.h
@@ -18,10 +18,22 @@
 #define _BENSON_BOARDINIT_H_
 
 #include <PiPei.h>
-#include <Library/IoLib.h>
+
+#include <Guid/PlatformInfo_Aplk.h>
+
+#include <Library/BaseMemoryLib.h>
+#include <Library/DebugLib.h>
+#include <Library/GpioLib.h>
 #include <Library/HobLib.h>
+#include <Library/IoLib.h>
+#include <Library/PcdLib.h>
+#include <Library/PeiServicesLib.h>
 #include <Library/TimerLib.h>
-#include <Guid/PlatformInfo_Aplk.h>
+
+#include <Ppi/BoardInitSignalling.h>
+
+#include "BoardInitMiscs.h"
+#include "PlatformId.h"
 
 VOID BensonGpioTest (VOID);
 
diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/AcpiTablePlatform.h b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/AcpiTablePlatform.h
index f588165..73e1dda 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/AcpiTablePlatform.h
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/AcpiTablePlatform.h
@@ -2,7 +2,7 @@
   This file describes the contents of the ACPI Fixed ACPI Description Table
   (FADT).
 
-  Copyright (c) 1999 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.<BR>
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
@@ -23,7 +23,7 @@
 // ACPI table information used to initialize tables.
 //
 #define EFI_ACPI_OEM_ID           'I','N','T','E','L',' '   // OEMID 6 bytes long
-#define EFI_ACPI_OEM_TABLE_ID     SIGNATURE_64('L','A','N','F','O','R','D','C') // OEM table id 8 bytes long
+#define EFI_ACPI_OEM_TABLE_ID     SIGNATURE_64('M','I','N','N','O','W','v','3') // OEM table id 8 bytes long
 #define EFI_ACPI_OEM_REVISION     0x00000005
 #define EFI_ACPI_CREATOR_ID       SIGNATURE_32('M','S','F','T')
 #define EFI_ACPI_CREATOR_REVISION 0x0100000D
diff --git a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/ScLpss.asl b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/ScLpss.asl
index 9ad39c8..bb462b7 100644
--- a/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/ScLpss.asl
+++ b/Platform/BroxtonPlatformPkg/Common/Acpi/AcpiTablesPCAT/ScLpss.asl
@@ -1,7 +1,7 @@
 /** @file
   ACPI DSDT table
 
-  Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.<BR>
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
@@ -47,24 +47,6 @@ scope (\_SB.PCI0) {
       Return (RBUF)
     }
 
-  Device (VUT0) {
-    Name (_HID, "INT3511")
-    Method (_STA, 0x0, NotSerialized)
-    {
-      If(LEqual(OSYS,2015)) {
-        Return(0xf)
-      }
-      else {
-        Return(0)
-      }
-    }
-    Method(_CRS, 0x0, NotSerialized){
-    Name(SBUF, ResourceTemplate (){
-    UARTSerialBus(115200,,,0xfc,,,,32,32,"\\_SB.PCI0.URT1" )
-    })
-    Return (SBUF)
-    }
-  } //Device (VUT0)
 
   } //  Device (URT1)
 
@@ -91,24 +73,6 @@ scope (\_SB.PCI0) {
       PSAT,   32
     }
 
-  Device (VUT1) {
-    Name (_HID, "INT3512")
-    Method (_STA, 0x0, NotSerialized)
-    {
-      If(LEqual(OSYS,2015)) {
-        Return(0xf)
-      }
-      else {
-        Return(0)
-      }
-    }
-    Method(_CRS, 0x0, NotSerialized){
-    Name(SBUF, ResourceTemplate (){
-    UARTSerialBus(115200,,,0xfc,,,,32,32,"\\_SB.PCI0.URT2" )
-    })
-    Return (SBUF)
-    }
-  } // Device(VUT1)
   } // Device (URT2)
 
   //
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/BoardGpiosPreMem.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/BoardGpiosPreMem.c
index 73b9afc..7116ba1 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/BoardGpiosPreMem.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/BoardGpiosPreMem.c
@@ -1,7 +1,7 @@
 /** @file
   Gpio setting for multiplatform before Memory init.
 
-  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>
+  Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
 
   This program and the accompanying materials
   are licensed and made available under the terms and conditions of the BSD License
@@ -281,7 +281,7 @@ MultiPlatformGpioUpdatePreMem (
     if (SystemConfiguration.LowPowerS0Idle == TRUE) {
       LpcGpioSize = sizeof (LpcGpio) / sizeof (LpcGpio[0]);
       //
-      // Set Indxe = 1 becasue the first element of LpcGpio[] has already set to IOS_Masked.
+      // Set Index = 1 becasue the first element of LpcGpio[] has already set to IOS_Masked.
       //
       for (Index = 1; Index < LpcGpioSize; Index++) {
 
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c
index 49121ae..f6d6910 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformPreMemPei/PlatformInitPreMem.c
@@ -1028,7 +1028,7 @@ PlatformInitPreMemEntryPoint (
     MultiPlatformGpioUpdatePreMem ();
 
     //
-    //Print out Patch version string (BXT)
+    // Print out Patch version string (BXT)
     //
     AsmWriteMsr64 (0x8B, 0);
     AsmCpuid (0x1, NULL, NULL, NULL, NULL);
diff --git a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c
index ff59496..06dffcd 100644
--- a/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c
+++ b/Platform/BroxtonPlatformPkg/Common/PlatformSettings/PlatformSetupDxe/PlatformSetupDxe.c
@@ -148,6 +148,7 @@ LoadPlatformDefaultValues (
       if (Private->FakeNvData.PmicSetupDefault == 1) {
         Private->FakeNvData.EnableRenderStandby = FALSE;
       }
+      break;
     default:
       break;
   }
-- 
2.10.1.windows.1

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