diff options
author | Duncan Laurie <dlaurie@google.com> | 2020-06-09 15:13:15 -0700 |
---|---|---|
committer | Duncan Laurie <dlaurie@chromium.org> | 2020-06-17 19:46:36 +0000 |
commit | 3cd3cb6f33cbbd18f9acac01ca5008e2dfb76242 (patch) | |
tree | ca4d89d23292321b7b57cb1f57c57b6a982ba58a /src | |
parent | 6f2f2368623567ff5915e1a53c5be0ea5b909f76 (diff) |
ec/google/wilco: Suppress UCSI events in S0ix
If a UCSI event comes in when the EC is in S0ix mode then the kernel
driver attempts a transaction but fails and this can leave the system
in an unexpected state where the only wake source is the power button.
This change will not notify the UCSI driver if the EC is in S0ix mode
and instead keep track of the event and send it on resume.
BUG=b:157923800
TEST=tested on drallion system:
1. Put drallion system into suspend
2. Attach power supply
3. Ensure the system can wake with keypress
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: I43acb089385d9b41ac955f053e409daad67423f1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42237
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/google/wilco/acpi/ec.asl | 9 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/event.asl | 10 |
2 files changed, 17 insertions, 2 deletions
diff --git a/src/ec/google/wilco/acpi/ec.asl b/src/ec/google/wilco/acpi/ec.asl index 1bb28be063..7531dbf8a5 100644 --- a/src/ec/google/wilco/acpi/ec.asl +++ b/src/ec/google/wilco/acpi/ec.asl @@ -7,6 +7,8 @@ Device (EC0) Name (_GPE, EC_SCI_GPI) Name (_STA, 0xf) Name (DBUG, Zero) + Name (ISSX, Zero) /* Is the EC in S0ix mode? */ + Name (UCEP, Zero) /* Is there a pending UCSI event? */ Name (_CRS, ResourceTemplate() { IO (Decode16, @@ -140,6 +142,8 @@ Device (EC0) */ Method (S0IX, 1, Serialized) { + ^ISSX = Arg0 /* Update S0ix state. */ + If (Arg0) { Printf ("EC Enter S0ix") W (CSEX, One) @@ -152,6 +156,11 @@ Device (EC0) } Else { Printf ("EC Exit S0ix") W (CSEX, Zero) + + /* If UCSI event happened during S0ix send it now. */ + If (^UCEP == One) { + ^_Q79 () + } } } diff --git a/src/ec/google/wilco/acpi/event.asl b/src/ec/google/wilco/acpi/event.asl index bf4bb19be7..4e24ee32de 100644 --- a/src/ec/google/wilco/acpi/event.asl +++ b/src/ec/google/wilco/acpi/event.asl @@ -139,6 +139,12 @@ Method (_Q66, 0, Serialized) /* UCSI SCI uses a unique event code */ Method (_Q79, 0, Serialized) { - Printf ("EC _Q79 UCSI Event") - Notify (^UCSI, 0x80) + If (ISSX == Zero) { + Printf ("EC _Q79 UCSI Event") + Notify (^UCSI, 0x80) + ^UCEP = Zero + } Else { + Printf ("EC _Q79 UCSI Event Masked in S0ix") + ^UCEP = One + } } |