[coreboot-gerrit] Change in coreboot[master]: mb/google/x86-boards: Get rid of power button device in coreboot

Furquan Shaikh (Code Review) gerrit at coreboot.org
Fri Jun 29 07:22:45 CEST 2018


Furquan Shaikh has uploaded this change for review. ( https://review.coreboot.org/27272


Change subject: mb/google/x86-boards: Get rid of power button device in coreboot
......................................................................

mb/google/x86-boards: Get rid of power button device in coreboot

As per the ACPI specification, there are two types of power button
devices:
1. Fixed hardware power button
2. Generic hardware power button

Fixed hardware power button is added by the OSPM if POWER_BUTTON flag
is not set in FADT by the BIOS. This device has its programming model
in PM1x_EVT_BLK. All ACPI compliant OSes are expected to add this
power button device by default if the power button FADT flag is not
set.

On the other hand, generic hardware power button can be used by
platforms if fixed register space cannot be used for the power button
device. In order to support this, power button device object with HID
PNP0C0C is expected to be added to ACPI tables. Additionally,
POWER_BUTTON flag should be set to indicate the presence of control
method for power button.

Chrome EC mainboards implemented the generic hardware power button in
a broken manner i.e. power button object with HID PNP0C0C is added to
ACPI however none of the boards set POWER_BUTTON flag in FADT. This
results in Linux kernel adding both fixed hardware power button as
well as generic hardware power button to the list of devices present
on the system. Though this is mostly harmless, it is logically
incorrect and can confuse any userspace utilities scanning the ACPI
devices.

This change gets rid of the generic hardware power button from all
google mainboards and relies completely on the fixed hardware power
button.

BUG=b:110913245
TEST=Verified that fixed hardware power button still works correctly
on nautilus.

Change-Id: I733e69affc82ed77aa79c5eca6654aaa531476ca
Signed-off-by: Furquan Shaikh <furquan at google.com>
---
M src/mainboard/google/auron/acpi/mainboard.asl
M src/mainboard/google/beltino/acpi/mainboard.asl
M src/mainboard/google/butterfly/acpi/mainboard.asl
M src/mainboard/google/chell/acpi/mainboard.asl
M src/mainboard/google/cyan/acpi/mainboard.asl
M src/mainboard/google/eve/dsdt.asl
M src/mainboard/google/fizz/dsdt.asl
D src/mainboard/google/glados/acpi/mainboard.asl
M src/mainboard/google/glados/dsdt.asl
M src/mainboard/google/jecht/acpi/mainboard.asl
M src/mainboard/google/kahlee/dsdt.asl
M src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/gpe.asl
D src/mainboard/google/lars/acpi/mainboard.asl
M src/mainboard/google/lars/dsdt.asl
M src/mainboard/google/link/acpi/mainboard.asl
M src/mainboard/google/parrot/acpi/mainboard.asl
M src/mainboard/google/poppy/dsdt.asl
M src/mainboard/google/rambi/acpi/mainboard.asl
M src/mainboard/google/slippy/acpi/mainboard.asl
M src/mainboard/google/stout/acpi/mainboard.asl
M src/mainboard/google/zoombini/dsdt.asl
21 files changed, 0 insertions(+), 153 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/72/27272/1

diff --git a/src/mainboard/google/auron/acpi/mainboard.asl b/src/mainboard/google/auron/acpi/mainboard.asl
index 2584015..907590d 100644
--- a/src/mainboard/google/auron/acpi/mainboard.asl
+++ b/src/mainboard/google/auron/acpi/mainboard.asl
@@ -16,14 +16,6 @@
 
 #include <variant/onboard.h>
 
-Scope (\_SB)
-{
-	Device (PWRB)
-	{
-		Name(_HID, EisaId("PNP0C0C"))
-	}
-}
-
 Scope (\_SB.PCI0.RP01)
 {
 	Device (WLAN)
diff --git a/src/mainboard/google/beltino/acpi/mainboard.asl b/src/mainboard/google/beltino/acpi/mainboard.asl
index e6f931e..692d635 100644
--- a/src/mainboard/google/beltino/acpi/mainboard.asl
+++ b/src/mainboard/google/beltino/acpi/mainboard.asl
@@ -16,14 +16,6 @@
 
 #include <onboard.h>
 
-Scope (\_SB)
-{
-	Device (PWRB)
-	{
-		Name(_HID, EisaId("PNP0C0C"))
-	}
-}
-
 /*
  * LAN connected to Root Port 3, becomes Root Port 1 after coalesce
  */
diff --git a/src/mainboard/google/butterfly/acpi/mainboard.asl b/src/mainboard/google/butterfly/acpi/mainboard.asl
index 8ecc128..4721f2a 100644
--- a/src/mainboard/google/butterfly/acpi/mainboard.asl
+++ b/src/mainboard/google/butterfly/acpi/mainboard.asl
@@ -27,11 +27,6 @@
 		}
 	}
 
-	Device (PWRB)
-	{
-		Name (_HID, EisaId("PNP0C0C"))
-	}
-
 	Device (TPAD)
 	{
 		Name (_ADR, 0x0)
diff --git a/src/mainboard/google/chell/acpi/mainboard.asl b/src/mainboard/google/chell/acpi/mainboard.asl
index 5d382c4..7113617 100644
--- a/src/mainboard/google/chell/acpi/mainboard.asl
+++ b/src/mainboard/google/chell/acpi/mainboard.asl
@@ -15,13 +15,5 @@
 
 #include "../gpio.h"
 
-Scope (\_SB)
-{
-	Device (PWRB)
-	{
-		Name (_HID, EisaId ("PNP0C0C"))
-	}
-}
-
 /* USB port entries */
 #include "usb.asl"
diff --git a/src/mainboard/google/cyan/acpi/mainboard.asl b/src/mainboard/google/cyan/acpi/mainboard.asl
index 1859fa8..9f27ac9 100644
--- a/src/mainboard/google/cyan/acpi/mainboard.asl
+++ b/src/mainboard/google/cyan/acpi/mainboard.asl
@@ -17,15 +17,6 @@
 
 #include <variant/onboard.h>
 
-Scope (\_SB)
-{
-	Device (PWRB)
-	{
-		Name (_HID, EisaId ("PNP0C0C"))
-		Name (_UID, 1)
-	}
-}
-
 Scope (\_SB.GPNC)
 {
 	Method (_AEI, 0, Serialized)  // _AEI: ACPI Event Interrupts
diff --git a/src/mainboard/google/eve/dsdt.asl b/src/mainboard/google/eve/dsdt.asl
index 2882d50..9382e35 100644
--- a/src/mainboard/google/eve/dsdt.asl
+++ b/src/mainboard/google/eve/dsdt.asl
@@ -36,10 +36,6 @@
 
 	Scope (\_SB)
 	{
-		Device (PWRB)
-		{
-			Name (_HID, EisaId ("PNP0C0C"))
-		}
 		Device (PCI0)
 		{
 			#include <soc/intel/skylake/acpi/systemagent.asl>
diff --git a/src/mainboard/google/fizz/dsdt.asl b/src/mainboard/google/fizz/dsdt.asl
index 69d9158..dc2fcfa 100644
--- a/src/mainboard/google/fizz/dsdt.asl
+++ b/src/mainboard/google/fizz/dsdt.asl
@@ -36,10 +36,6 @@
 
 	Scope (\_SB)
 	{
-		Device (PWRB)
-		{
-			Name (_HID, EisaId ("PNP0C0C"))
-		}
 		Device (PCI0)
 		{
 			#include <soc/intel/skylake/acpi/systemagent.asl>
diff --git a/src/mainboard/google/glados/acpi/mainboard.asl b/src/mainboard/google/glados/acpi/mainboard.asl
deleted file mode 100644
index 4d0f3fd..0000000
--- a/src/mainboard/google/glados/acpi/mainboard.asl
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2015 Google Inc.
- *
- * 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 "../gpio.h"
-
-Scope (\_SB)
-{
-	Device (PWRB)
-	{
-		Name (_HID, EisaId ("PNP0C0C"))
-	}
-}
diff --git a/src/mainboard/google/glados/dsdt.asl b/src/mainboard/google/glados/dsdt.asl
index b5a37c6..21e9587 100644
--- a/src/mainboard/google/glados/dsdt.asl
+++ b/src/mainboard/google/glados/dsdt.asl
@@ -49,7 +49,4 @@
 
 	// Chipset specific sleep states
 	#include <soc/intel/skylake/acpi/sleepstates.asl>
-
-	// Mainboard specific
-	#include "acpi/mainboard.asl"
 }
diff --git a/src/mainboard/google/jecht/acpi/mainboard.asl b/src/mainboard/google/jecht/acpi/mainboard.asl
index 4b2d9ca..bf6070e 100644
--- a/src/mainboard/google/jecht/acpi/mainboard.asl
+++ b/src/mainboard/google/jecht/acpi/mainboard.asl
@@ -16,14 +16,6 @@
 
 #include <mainboard/google/jecht/onboard.h>
 
-Scope (\_SB)
-{
-	Device (PWRB)
-	{
-		Name(_HID, EisaId("PNP0C0C"))
-	}
-}
-
 /*
  * LAN connected to Root Port 3, becomes Root Port 1 after coalesce
  */
diff --git a/src/mainboard/google/kahlee/dsdt.asl b/src/mainboard/google/kahlee/dsdt.asl
index e5276d3..14f0d40 100644
--- a/src/mainboard/google/kahlee/dsdt.asl
+++ b/src/mainboard/google/kahlee/dsdt.asl
@@ -56,11 +56,6 @@
 		/* IRQ Routing mapping for this platform (in \_SB scope) */
 		#include <variant/acpi/routing.asl>
 
-		Device(PWRB) {
-			Name(_HID, EISAID("PNP0C0C"))
-			Name(_UID, 0xAA)
-		}
-
 		/* Describe the SOC */
 		#include <soc.asl>
 
diff --git a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/gpe.asl b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/gpe.asl
index 9dbbde5..dc7c804 100644
--- a/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/gpe.asl
+++ b/src/mainboard/google/kahlee/variants/baseboard/include/baseboard/acpi/gpe.asl
@@ -19,7 +19,6 @@
 	Method (_L08)
 	{
 		/* DBGO ("\\_GPE\\_L08\n") */
-		Notify (\_SB.PWRB, 0x02)	/* NOTIFY_DEVICE_WAKE */
 	}
 
 	/*  EHCI USB controller PME#  SCIMAP24*/
@@ -27,7 +26,6 @@
 	{
 		/* DBGO ("\\_GPE\\_L18\n") */
 		Notify (\_SB.PCI0.EHC0, 0x02)	/* NOTIFY_DEVICE_WAKE */
-		Notify (\_SB.PWRB, 0x02)	/* NOTIFY_DEVICE_WAKE */
 	}
 
 	/*  XHCI USB controller PME#  SCIMAP56*/
@@ -35,6 +33,5 @@
 	{
 		/* DBGO ("\\_GPE\\_L1F\n") */
 		Notify (\_SB.PCI0.XHC0, 0x02)	/* NOTIFY_DEVICE_WAKE */
-		Notify (\_SB.PWRB, 0x02)	/* NOTIFY_DEVICE_WAKE */
 	}
 }	/* End Scope GPE */
diff --git a/src/mainboard/google/lars/acpi/mainboard.asl b/src/mainboard/google/lars/acpi/mainboard.asl
deleted file mode 100644
index 861d39f..0000000
--- a/src/mainboard/google/lars/acpi/mainboard.asl
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright (C) 2014 Google Inc.
- * Copyright (C) 2015 Intel Corporation.
- *
- * 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 "../gpio.h"
-
-Scope (\_SB)
-{
-	Device (PWRB)
-	{
-		Name (_HID, EisaId ("PNP0C0C"))
-	}
-}
diff --git a/src/mainboard/google/lars/dsdt.asl b/src/mainboard/google/lars/dsdt.asl
index b5a37c6..21e9587 100644
--- a/src/mainboard/google/lars/dsdt.asl
+++ b/src/mainboard/google/lars/dsdt.asl
@@ -49,7 +49,4 @@
 
 	// Chipset specific sleep states
 	#include <soc/intel/skylake/acpi/sleepstates.asl>
-
-	// Mainboard specific
-	#include "acpi/mainboard.asl"
 }
diff --git a/src/mainboard/google/link/acpi/mainboard.asl b/src/mainboard/google/link/acpi/mainboard.asl
index aa33d14..6a2d890 100644
--- a/src/mainboard/google/link/acpi/mainboard.asl
+++ b/src/mainboard/google/link/acpi/mainboard.asl
@@ -17,11 +17,6 @@
 #include <mainboard/google/link/onboard.h>
 
 Scope (\_SB) {
-	Device (PWRB)
-	{
-		Name(_HID, EisaId("PNP0C0C"))
-	}
-
 	Device (TPAD)
 	{
 		Name (_ADR, 0x0)
diff --git a/src/mainboard/google/parrot/acpi/mainboard.asl b/src/mainboard/google/parrot/acpi/mainboard.asl
index 2a5c92f..4906efc 100644
--- a/src/mainboard/google/parrot/acpi/mainboard.asl
+++ b/src/mainboard/google/parrot/acpi/mainboard.asl
@@ -41,11 +41,6 @@
 		}
 	}
 
-	Device (PWRB)
-	{
-		Name(_HID, EisaId("PNP0C0C"))
-	}
-
 	Device (TPAD)
 	{
 		Name (_ADR, 0x0)
diff --git a/src/mainboard/google/poppy/dsdt.asl b/src/mainboard/google/poppy/dsdt.asl
index a922d10..5b776c9 100644
--- a/src/mainboard/google/poppy/dsdt.asl
+++ b/src/mainboard/google/poppy/dsdt.asl
@@ -36,10 +36,6 @@
 
 	Scope (\_SB)
 	{
-		Device (PWRB)
-		{
-			Name (_HID, EisaId ("PNP0C0C"))
-		}
 		Device (PCI0)
 		{
 			/* Image processing unit */
diff --git a/src/mainboard/google/rambi/acpi/mainboard.asl b/src/mainboard/google/rambi/acpi/mainboard.asl
index e75357d..e9422b1 100644
--- a/src/mainboard/google/rambi/acpi/mainboard.asl
+++ b/src/mainboard/google/rambi/acpi/mainboard.asl
@@ -18,11 +18,6 @@
 
 Scope (\_SB)
 {
-	Device (PWRB)
-	{
-		Name (_HID, EisaId ("PNP0C0C"))
-		Name (_UID, 1)
-	}
 #ifdef BOARD_TRACKPAD_IRQ
 	/* Wake device for touchpad */
 	Device (TPAD)
diff --git a/src/mainboard/google/slippy/acpi/mainboard.asl b/src/mainboard/google/slippy/acpi/mainboard.asl
index f12a440..e9ade24 100644
--- a/src/mainboard/google/slippy/acpi/mainboard.asl
+++ b/src/mainboard/google/slippy/acpi/mainboard.asl
@@ -14,14 +14,6 @@
 
 #include <onboard.h>
 
-Scope (\_SB)
-{
-	Device (PWRB)
-	{
-		Name(_HID, EisaId("PNP0C0C"))
-	}
-}
-
 #include <variant/acpi/mainboard.asl>
 
 /* USB port entries */
diff --git a/src/mainboard/google/stout/acpi/mainboard.asl b/src/mainboard/google/stout/acpi/mainboard.asl
index 194ec63..92f160d 100644
--- a/src/mainboard/google/stout/acpi/mainboard.asl
+++ b/src/mainboard/google/stout/acpi/mainboard.asl
@@ -33,9 +33,4 @@
 			Store (Arg0, \_SB.PCI0.LPCB.EC0.HWLO)
 		}
 	}
-
-	Device (PWRB)
-	{
-		Name (_HID, EisaId("PNP0C0C"))
-	}
 }
diff --git a/src/mainboard/google/zoombini/dsdt.asl b/src/mainboard/google/zoombini/dsdt.asl
index e892b47..3140990 100644
--- a/src/mainboard/google/zoombini/dsdt.asl
+++ b/src/mainboard/google/zoombini/dsdt.asl
@@ -37,10 +37,6 @@
 	#include <soc/intel/cannonlake/acpi/cpu.asl>
 
 	Scope (\_SB) {
-		Device (PWRB)
-		{
-			Name (_HID, EisaId ("PNP0C0C"))
-		}
 		Device (PCI0)
 		{
 			#include <soc/intel/cannonlake/acpi/northbridge.asl>

-- 
To view, visit https://review.coreboot.org/27272
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I733e69affc82ed77aa79c5eca6654aaa531476ca
Gerrit-Change-Number: 27272
Gerrit-PatchSet: 1
Gerrit-Owner: Furquan Shaikh <furquan at google.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180629/3b1b7960/attachment-0001.html>


More information about the coreboot-gerrit mailing list