From 31fb846c59be4b24fe621b67012e57de90c75ad5 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Wed, 8 Nov 2017 19:52:51 +0100 Subject: ec/lenovo/h8/acpi: Apply state on wake Implement ACPI S3 resume control to restore the state before entering sleep. * Store the requested state wake state for bluetooth and WWAN. * Add new methods to init the state and apply the requested state on wake. * Call the new method on all devices. Change-Id: I13c08b8c6b1bf0f3deb25a464b26880d8469c005 Signed-off-by: Patrick Rudolph Reviewed-on: https://review.coreboot.org/22377 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held --- src/mainboard/lenovo/t400/acpi/platform.asl | 3 +++ src/mainboard/lenovo/t420s/acpi/platform.asl | 3 +++ src/mainboard/lenovo/t430/acpi/platform.asl | 4 ++++ src/mainboard/lenovo/t430s/acpi/platform.asl | 3 +++ src/mainboard/lenovo/t520/acpi/platform.asl | 3 +++ src/mainboard/lenovo/t530/acpi/platform.asl | 3 +++ src/mainboard/lenovo/t60/acpi/platform.asl | 3 +++ src/mainboard/lenovo/x1_carbon_gen1/acpi/platform.asl | 3 +++ src/mainboard/lenovo/x200/acpi/platform.asl | 3 +++ src/mainboard/lenovo/x201/acpi/platform.asl | 3 +++ src/mainboard/lenovo/x220/acpi/platform.asl | 3 +++ src/mainboard/lenovo/x230/acpi/platform.asl | 3 +++ src/mainboard/lenovo/x60/acpi/platform.asl | 3 +++ 13 files changed, 40 insertions(+) (limited to 'src/mainboard/lenovo') diff --git a/src/mainboard/lenovo/t400/acpi/platform.asl b/src/mainboard/lenovo/t400/acpi/platform.asl index 5c6f96861d..85357a50df 100644 --- a/src/mainboard/lenovo/t400/acpi/platform.asl +++ b/src/mainboard/lenovo/t400/acpi/platform.asl @@ -31,6 +31,9 @@ Method(_PTS,1) Method(_WAK,1) { + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + // CPU specific part // Notify PCI Express slots in case a card diff --git a/src/mainboard/lenovo/t420s/acpi/platform.asl b/src/mainboard/lenovo/t420s/acpi/platform.asl index 6f26c5a56f..e4c8a24f78 100644 --- a/src/mainboard/lenovo/t420s/acpi/platform.asl +++ b/src/mainboard/lenovo/t420s/acpi/platform.asl @@ -32,6 +32,9 @@ Method(_WAK,1) Store (0, \_TZ.MEB1) Store (0, \_TZ.MEB2) + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + /* Not implemented. */ Return(Package(){0,0}) } diff --git a/src/mainboard/lenovo/t430/acpi/platform.asl b/src/mainboard/lenovo/t430/acpi/platform.asl index efbf0ea7ef..13ea2c1b40 100644 --- a/src/mainboard/lenovo/t430/acpi/platform.asl +++ b/src/mainboard/lenovo/t430/acpi/platform.asl @@ -18,6 +18,10 @@ Method(_WAK,1) /* ME may not be up yet. */ Store (0, \_TZ.MEB1) Store (0, \_TZ.MEB2) + + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + Return(Package(){0,0}) } diff --git a/src/mainboard/lenovo/t430s/acpi/platform.asl b/src/mainboard/lenovo/t430s/acpi/platform.asl index 6f26c5a56f..e4c8a24f78 100644 --- a/src/mainboard/lenovo/t430s/acpi/platform.asl +++ b/src/mainboard/lenovo/t430s/acpi/platform.asl @@ -32,6 +32,9 @@ Method(_WAK,1) Store (0, \_TZ.MEB1) Store (0, \_TZ.MEB2) + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + /* Not implemented. */ Return(Package(){0,0}) } diff --git a/src/mainboard/lenovo/t520/acpi/platform.asl b/src/mainboard/lenovo/t520/acpi/platform.asl index 6f26c5a56f..e4c8a24f78 100644 --- a/src/mainboard/lenovo/t520/acpi/platform.asl +++ b/src/mainboard/lenovo/t520/acpi/platform.asl @@ -32,6 +32,9 @@ Method(_WAK,1) Store (0, \_TZ.MEB1) Store (0, \_TZ.MEB2) + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + /* Not implemented. */ Return(Package(){0,0}) } diff --git a/src/mainboard/lenovo/t530/acpi/platform.asl b/src/mainboard/lenovo/t530/acpi/platform.asl index 9cd327a765..bf686f444f 100644 --- a/src/mainboard/lenovo/t530/acpi/platform.asl +++ b/src/mainboard/lenovo/t530/acpi/platform.asl @@ -32,6 +32,9 @@ Method(_WAK,1) Store (0, \_TZ.MEB1) Store (0, \_TZ.MEB2) + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + /* Not implemented. */ Return(Package(){0,0}) } diff --git a/src/mainboard/lenovo/t60/acpi/platform.asl b/src/mainboard/lenovo/t60/acpi/platform.asl index 006b6f0ba2..f9e991b984 100644 --- a/src/mainboard/lenovo/t60/acpi/platform.asl +++ b/src/mainboard/lenovo/t60/acpi/platform.asl @@ -29,6 +29,9 @@ Method(_PTS,1) Method(_WAK,1) { + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + // CPU specific part // Notify PCI Express slots in case a card diff --git a/src/mainboard/lenovo/x1_carbon_gen1/acpi/platform.asl b/src/mainboard/lenovo/x1_carbon_gen1/acpi/platform.asl index 3e9225cd34..b63c91c641 100644 --- a/src/mainboard/lenovo/x1_carbon_gen1/acpi/platform.asl +++ b/src/mainboard/lenovo/x1_carbon_gen1/acpi/platform.asl @@ -30,6 +30,9 @@ Method(_WAK,1) Store (0, \_TZ.MEB1) Store (0, \_TZ.MEB2) + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + /* Not implemented. */ Return(Package(){0,0}) } diff --git a/src/mainboard/lenovo/x200/acpi/platform.asl b/src/mainboard/lenovo/x200/acpi/platform.asl index 5c6f96861d..85357a50df 100644 --- a/src/mainboard/lenovo/x200/acpi/platform.asl +++ b/src/mainboard/lenovo/x200/acpi/platform.asl @@ -31,6 +31,9 @@ Method(_PTS,1) Method(_WAK,1) { + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + // CPU specific part // Notify PCI Express slots in case a card diff --git a/src/mainboard/lenovo/x201/acpi/platform.asl b/src/mainboard/lenovo/x201/acpi/platform.asl index 0a6d5f3448..7d7013bcd3 100644 --- a/src/mainboard/lenovo/x201/acpi/platform.asl +++ b/src/mainboard/lenovo/x201/acpi/platform.asl @@ -63,6 +63,9 @@ Method(_PTS,1) Method(_WAK,1) { + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + /* Not implemented. */ Return(Package(){0,0}) } diff --git a/src/mainboard/lenovo/x220/acpi/platform.asl b/src/mainboard/lenovo/x220/acpi/platform.asl index 9cd327a765..bf686f444f 100644 --- a/src/mainboard/lenovo/x220/acpi/platform.asl +++ b/src/mainboard/lenovo/x220/acpi/platform.asl @@ -32,6 +32,9 @@ Method(_WAK,1) Store (0, \_TZ.MEB1) Store (0, \_TZ.MEB2) + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + /* Not implemented. */ Return(Package(){0,0}) } diff --git a/src/mainboard/lenovo/x230/acpi/platform.asl b/src/mainboard/lenovo/x230/acpi/platform.asl index 9cd327a765..bf686f444f 100644 --- a/src/mainboard/lenovo/x230/acpi/platform.asl +++ b/src/mainboard/lenovo/x230/acpi/platform.asl @@ -32,6 +32,9 @@ Method(_WAK,1) Store (0, \_TZ.MEB1) Store (0, \_TZ.MEB2) + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + /* Not implemented. */ Return(Package(){0,0}) } diff --git a/src/mainboard/lenovo/x60/acpi/platform.asl b/src/mainboard/lenovo/x60/acpi/platform.asl index 006b6f0ba2..f9e991b984 100644 --- a/src/mainboard/lenovo/x60/acpi/platform.asl +++ b/src/mainboard/lenovo/x60/acpi/platform.asl @@ -29,6 +29,9 @@ Method(_PTS,1) Method(_WAK,1) { + /* Wake the HKEY to init BT/WWAN */ + \_SB.PCI0.LPCB.EC.HKEY.WAKE (Arg0) + // CPU specific part // Notify PCI Express slots in case a card -- cgit v1.2.3