[coreboot-gerrit] New patch to review for coreboot: google/slippy: consolidate variants' common mainboard.asl code

Matt DeVillier (matt.devillier@gmail.com) gerrit at coreboot.org
Wed Feb 15 08:44:40 CET 2017


Matt DeVillier (matt.devillier at gmail.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/18368

-gerrit

commit fba2e33b53edb45f0beb8103fc0f77d7f081ed0e
Author: Matt DeVillier <matt.devillier at gmail.com>
Date:   Tue Feb 14 23:00:57 2017 -0600

    google/slippy: consolidate variants' common mainboard.asl code
    
    Move code common code from each variant's mainboard.asl into
    common ACPI code for all variants (like google/auron).  This also
    adds the _PRW method for the LID0 device for falco and peppy, which
    omitted the function  when they were originally upstreamed.
    
    See Chromium commit c8b41f7, falco: Add _PRW for LID0 ACPI Device
    
    Change-Id: I7f5129340249a986f5996af37c01ccbde8d374e8
    Signed-off-by: Matt DeVillier <matt.devillier at gmail.com>
---
 src/mainboard/google/slippy/acpi/mainboard.asl     | 39 ++++++++++++++++++++++
 src/mainboard/google/slippy/dsdt.asl               |  2 +-
 .../falco/include/variant/acpi/mainboard.asl       | 20 -----------
 .../leon/include/variant/acpi/mainboard.asl        | 24 -------------
 .../peppy/include/variant/acpi/mainboard.asl       | 20 -----------
 .../wolf/include/variant/acpi/mainboard.asl        | 24 -------------
 6 files changed, 40 insertions(+), 89 deletions(-)

diff --git a/src/mainboard/google/slippy/acpi/mainboard.asl b/src/mainboard/google/slippy/acpi/mainboard.asl
new file mode 100644
index 0000000..35bc1b4
--- /dev/null
+++ b/src/mainboard/google/slippy/acpi/mainboard.asl
@@ -0,0 +1,39 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of
+ * the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ */
+
+#include <onboard.h>
+
+Scope (\_SB)
+{
+	Device (LID0)
+	{
+		Name(_HID, EisaId("PNP0C0D"))
+		Method(_LID, 0)
+		{
+			Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
+			Return (\LIDS)
+		}
+
+		// There is no GPIO for LID, the EC pulses WAKE# pin instead.
+		// There is no GPE for WAKE#, so fake it with PCI_EXP_WAKE
+		Name (_PRW, Package(){ 0x69, 5 }) // PCI_EXP
+	}
+
+	Device (PWRB)
+	{
+		Name(_HID, EisaId("PNP0C0C"))
+	}
+}
+
+#include <variant/acpi/mainboard.asl>
diff --git a/src/mainboard/google/slippy/dsdt.asl b/src/mainboard/google/slippy/dsdt.asl
index 56771c2..7d41f9a 100644
--- a/src/mainboard/google/slippy/dsdt.asl
+++ b/src/mainboard/google/slippy/dsdt.asl
@@ -54,7 +54,7 @@ DefinitionBlock(
 	}
 
 	// Mainboard specific
-	#include <variant/acpi/mainboard.asl>
+	#include "acpi/mainboard.asl"
 
 	// Thermal handler
 	#include "acpi/thermal.asl"
diff --git a/src/mainboard/google/slippy/variants/falco/include/variant/acpi/mainboard.asl b/src/mainboard/google/slippy/variants/falco/include/variant/acpi/mainboard.asl
index 417dbfe..acf8a03 100644
--- a/src/mainboard/google/slippy/variants/falco/include/variant/acpi/mainboard.asl
+++ b/src/mainboard/google/slippy/variants/falco/include/variant/acpi/mainboard.asl
@@ -14,26 +14,6 @@
  * GNU General Public License for more details.
  */
 
-#include <onboard.h>
-
-Scope (\_SB)
-{
-	Device (LID0)
-	{
-		Name(_HID, EisaId("PNP0C0D"))
-		Method(_LID, 0)
-		{
-			Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
-			Return (\LIDS)
-		}
-	}
-
-	Device (PWRB)
-	{
-		Name(_HID, EisaId("PNP0C0C"))
-	}
-}
-
 Scope (\_SB.PCI0.I2C0)
 {
 	Device (CTPA)
diff --git a/src/mainboard/google/slippy/variants/leon/include/variant/acpi/mainboard.asl b/src/mainboard/google/slippy/variants/leon/include/variant/acpi/mainboard.asl
index 4afe310..8542f97 100644
--- a/src/mainboard/google/slippy/variants/leon/include/variant/acpi/mainboard.asl
+++ b/src/mainboard/google/slippy/variants/leon/include/variant/acpi/mainboard.asl
@@ -14,30 +14,6 @@
  * GNU General Public License for more details.
  */
 
-#include <onboard.h>
-
-Scope (\_SB)
-{
-	Device (LID0)
-	{
-		Name(_HID, EisaId("PNP0C0D"))
-		Method(_LID, 0)
-		{
-			Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
-			Return (\LIDS)
-		}
-
-		// There is no GPIO for LID, the EC pulses WAKE# pin instead.
-		// There is no GPE for WAKE#, so fake it with PCI_EXP_WAKE
-		Name (_PRW, Package(){ 0x69, 5 }) // PCI_EXP
-	}
-
-	Device (PWRB)
-	{
-		Name(_HID, EisaId("PNP0C0C"))
-	}
-}
-
 Scope (\_SB.PCI0.I2C0)
 {
 	Device (CTPA)
diff --git a/src/mainboard/google/slippy/variants/peppy/include/variant/acpi/mainboard.asl b/src/mainboard/google/slippy/variants/peppy/include/variant/acpi/mainboard.asl
index cc0c688..9a92135 100644
--- a/src/mainboard/google/slippy/variants/peppy/include/variant/acpi/mainboard.asl
+++ b/src/mainboard/google/slippy/variants/peppy/include/variant/acpi/mainboard.asl
@@ -14,26 +14,6 @@
  * GNU General Public License for more details.
  */
 
-#include <onboard.h>
-
-Scope (\_SB)
-{
-	Device (LID0)
-	{
-		Name(_HID, EisaId("PNP0C0D"))
-		Method(_LID, 0)
-		{
-			Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
-			Return (\LIDS)
-		}
-	}
-
-	Device (PWRB)
-	{
-		Name(_HID, EisaId("PNP0C0C"))
-	}
-}
-
 Scope (\_SB.PCI0.I2C0)
 {
 	Device (ETPA)
diff --git a/src/mainboard/google/slippy/variants/wolf/include/variant/acpi/mainboard.asl b/src/mainboard/google/slippy/variants/wolf/include/variant/acpi/mainboard.asl
index 335077c..764eac9 100644
--- a/src/mainboard/google/slippy/variants/wolf/include/variant/acpi/mainboard.asl
+++ b/src/mainboard/google/slippy/variants/wolf/include/variant/acpi/mainboard.asl
@@ -14,30 +14,6 @@
  * GNU General Public License for more details.
  */
 
-#include <onboard.h>
-
-Scope (\_SB)
-{
-	Device (LID0)
-	{
-		Name(_HID, EisaId("PNP0C0D"))
-		Method(_LID, 0)
-		{
-			Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
-			Return (\LIDS)
-		}
-
-		// There is no GPIO for LID, the EC pulses WAKE# pin instead.
-		// There is no GPE for WAKE#, so fake it with PCI_EXP_WAKE
-		Name (_PRW, Package(){ 0x69, 5 }) // PCI_EXP
-	}
-
-	Device (PWRB)
-	{
-		Name(_HID, EisaId("PNP0C0C"))
-	}
-}
-
 Scope (\_SB.PCI0.I2C0)
 {
 	Device (CTPA)



More information about the coreboot-gerrit mailing list