diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2014-09-29 08:51:45 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2015-04-10 19:22:25 +0200 |
commit | 1fad694953add0af54721647e5be360045987142 (patch) | |
tree | 344ac17574523a2b6accc66c63044dd6c9f7a6ef /src/soc/intel/broadwell/acpi/platform.asl | |
parent | 9afc5c05f083631424e4e6a86a6c08fcc3e6473b (diff) | |
download | coreboot-1fad694953add0af54721647e5be360045987142.tar.gz coreboot-1fad694953add0af54721647e5be360045987142.tar.bz2 coreboot-1fad694953add0af54721647e5be360045987142.zip |
broadwell: Add support for ACPI \_GPE._SWS
In order to report the GPE that woke the system to the kernel
coreboot needs to keep track of the first GPE wake source and
save it in NVS so it can be returned in \_GPE._SWS method.
This is similar to the saving of PM1 status but needs to go
through all the GPE0_STS registers and check for enabled and
triggered events.
A bit of cleanup is done for areas that were touched:
- platform.asl was not formatted correctly
BUG=chrome-os-partner:8127
BRANCH=samus,auron
TEST=manual:
- suspend/resume and wake from EC event like keyboard:
ACPI _SWS is PM1 Index -1 GPE Index 112 ("special" GPIO27)
- suspend/resume and wake from RTC event:
ACPI _SWS is PM1 Index 10 GPE Index -1 (RTC)
- suspend/resume and wake from power button:
ACPI _SWS is PM1 Index 8 GPE Index -1
- suspend/resume and wake from touchpad:
ACPI _SWS is PM1 Index -1 GPE Index 13
- suspend/resume and wake from WLAN:
ACPI _SWS is PM1 Index -1 GPE Index 10
Change-Id: I574f8cd83c8bb42f420e1a00e71a23aa23195f53
Signed-off-by: Stefan Reinauer <reinauer@chromium.org>
Original-Commit-Id: d4e06c7dfc73f2952ce8f81263e316980aa9760f
Original-Change-Id: I9bfbbe4385f2acc2a50f41ae321b4bae262b7078
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/220324
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: http://review.coreboot.org/9460
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/soc/intel/broadwell/acpi/platform.asl')
-rw-r--r-- | src/soc/intel/broadwell/acpi/platform.asl | 35 |
1 files changed, 24 insertions, 11 deletions
diff --git a/src/soc/intel/broadwell/acpi/platform.asl b/src/soc/intel/broadwell/acpi/platform.asl index 2361fe8b3e6a..f63168a745aa 100644 --- a/src/soc/intel/broadwell/acpi/platform.asl +++ b/src/soc/intel/broadwell/acpi/platform.asl @@ -36,7 +36,7 @@ Field (POST, ByteAcc, Lock, Preserve) } /* SMI I/O Trap */ -Method(TRAP, 1, Serialized) +Method (TRAP, 1, Serialized) { Store (Arg0, SMIF) // SMI Function Store (0, TRP0) // Generate trap @@ -50,29 +50,42 @@ Method(TRAP, 1, Serialized) * with a parameter of 1 for Local Apic/IOAPIC configuration. */ -Method(_PIC, 1) +Method (_PIC, 1) { - // Remember the OS' IRQ routing choice. - Store(Arg0, PICM) + /* Remember the OS' IRQ routing choice. */ + Store (Arg0, PICM) } -/* The _PTS method (Prepare To Sleep) is called before the OS is +/* + * The _PTS method (Prepare To Sleep) is called before the OS is * entering a sleep state. The sleep state number is passed in Arg0 */ -Method(_PTS,1) +Method (_PTS, 1) { } /* The _WAK method is called on system wakeup */ -Method(_WAK,1) +Method (_WAK, 1) +{ + Return (Package (){ 0, 0 }) +} + +Scope (\_SB) { - Return(Package(){0,0}) + Method (_SWS) + { + /* Index into PM1 for device that caused wake */ + Return (\PM1I) + } } -Method (_SWS) +Scope (\_GPE) { - /* Index into PM1 for device that caused wake */ - Return (\PM1I) + Method (_SWS) + { + /* Index into GPE for device that caused wake */ + Return (\GPEI) + } } |