summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-04-18 21:29:59 -0500
committerAlexandru Gagniuc <mr.nuke.me@gmail.com>2014-04-20 21:34:01 +0200
commitc38d9913878019bbe476b8b8bc5631846ef2e58f (patch)
treed340dfd21796076aa4125b756cdb25ea2f58302b /src
parentc4e7db51fc83b99c43b25a8f698a9d007ed45dc6 (diff)
downloadcoreboot-c38d9913878019bbe476b8b8bc5631846ef2e58f.tar.xz
hp/pavilion_m6_1035dx: Suspend/resume on lid close/open with ACPI
This patch completes ACPI support for the lid switch. The lid SCI now notifies the OSPM of the status change when the lid is closed or opened, allowing system to suspend. The wake source is also declares, and the system wakes when the lid is opened. The system resumes successfully, but the display still does not come back on. Change-Id: I803c4fc64e15f8d1a90791ec246af66604646d8b Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com> Reviewed-on: http://review.coreboot.org/5549 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl9
-rw-r--r--src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl17
-rw-r--r--src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl2
3 files changed, 28 insertions, 0 deletions
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl b/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl
index a240308c78..f228691fc3 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl
+++ b/src/mainboard/hp/pavilion_m6_1035dx/acpi/gpe.asl
@@ -54,6 +54,15 @@ Scope(\_GPE) { /* Start Scope GPE */
/* DBGO("\\_GPE\\_L11\n") */
}
+ /* Lid switch opened or closed */
+ Method(_L16) {
+ Store("Lid status changed", Debug)
+ /* Flip trigger polarity */
+ Not(LPOL, LPOL)
+ /* Notify lid object of status change */
+ Notify(\_SB.LID, 0x80)
+ }
+
/* GPIO0 or GEvent8 event */
Method(_L18) {
/* DBGO("\\_GPE\\_L18\n") */
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl b/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl
index 6a100387ce..ecca0872ff 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl
+++ b/src/mainboard/hp/pavilion_m6_1035dx/acpi/mainboard.asl
@@ -57,6 +57,14 @@
GE22, 1, /* General event 22 - connected to lid switch */
}
+ /* SMI/SCI control block -- hardcoded to 0xfed80200 by AGESA */
+ OperationRegion (SMIX, SystemMemory, 0xfed80200, 0x100)
+ Field (SMIX, AnyAcc, NoLock, Preserve) {
+ Offset (0x08), /* SCI level: 0 = active low, 1 = active high */
+ , 22,
+ LPOL, 1, /* SCI22 trigger polarity - lid switch */
+ }
+
/*
* Used by EC code on certain events
*
@@ -75,10 +83,19 @@ Scope (\_SB) {
Device (LID)
{
Name(_HID, EisaId("PNP0C0D"))
+ Name(_PRW, Package () {EC_LID_GPE, 0x04}) /* wake from S1-S4 */
Method(_LID, 0)
{
Return (GE22) /* GE pin 22 */
}
+
+ Method (_INI, 0)
+ {
+ /* Make sure lid trigger polarity is set so that we
+ * trigger an SCI when lid status changes.
+ */
+ Not(GE22, LPOL)
+ }
}
Device (MB) {
diff --git a/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl b/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl
index c1f1933d61..4783394123 100644
--- a/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl
+++ b/src/mainboard/hp/pavilion_m6_1035dx/dsdt.asl
@@ -18,6 +18,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "mainboard.h"
+
/* DefinitionBlock Statement */
DefinitionBlock (
"DSDT.AML", /* Output filename */