From d7b88dcbcd1a8c58cb7a4c806df7bb8eb23899ae Mon Sep 17 00:00:00 2001 From: Furquan Shaikh Date: Wed, 25 Jul 2018 08:49:23 -0700 Subject: 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 Reviewed-on: https://review.coreboot.org/27272 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Aaron Durbin --- src/mainboard/google/kahlee/dsdt.asl | 5 ----- .../google/kahlee/variants/baseboard/include/baseboard/acpi/gpe.asl | 3 --- 2 files changed, 8 deletions(-) (limited to 'src/mainboard/google/kahlee') diff --git a/src/mainboard/google/kahlee/dsdt.asl b/src/mainboard/google/kahlee/dsdt.asl index e5276d37c0..14f0d409c2 100644 --- a/src/mainboard/google/kahlee/dsdt.asl +++ b/src/mainboard/google/kahlee/dsdt.asl @@ -56,11 +56,6 @@ DefinitionBlock ( /* IRQ Routing mapping for this platform (in \_SB scope) */ #include - Device(PWRB) { - Name(_HID, EISAID("PNP0C0C")) - Name(_UID, 0xAA) - } - /* Describe the SOC */ #include 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 9dbbde557c..dc7c804faa 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 @@ Scope (\_GPE) Method (_L08) { /* DBGO ("\\_GPE\\_L08\n") */ - Notify (\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */ } /* EHCI USB controller PME# SCIMAP24*/ @@ -27,7 +26,6 @@ Scope (\_GPE) { /* 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 @@ Scope (\_GPE) { /* DBGO ("\\_GPE\\_L1F\n") */ Notify (\_SB.PCI0.XHC0, 0x02) /* NOTIFY_DEVICE_WAKE */ - Notify (\_SB.PWRB, 0x02) /* NOTIFY_DEVICE_WAKE */ } } /* End Scope GPE */ -- cgit v1.2.3