diff options
author | Duncan Laurie <dlaurie@google.com> | 2018-11-20 17:27:47 -0800 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2018-12-04 10:20:44 +0000 |
commit | 4c14ca836fb50d7cccee6b1cb85faa3046b03934 (patch) | |
tree | 4faf1fd348984880237bd6ad402eac76ccc42192 /src | |
parent | e68042f0210738c6c8c15fc2b330801db14d7f22 (diff) |
ec/google/wilco/acpi: Fix issues and clean up
- Disable debug output from read/write methods by default
- Use argument to _REG to disable SCI when EC is unregistered
- Change read/write macros to sync level 2 so they can be called
when a mutex is already held
- Define some missing events
Change-Id: Ic65ebbb6a6151444c47b4aeff7429e186856c49a
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/29760
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/google/wilco/acpi/ec.asl | 17 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/ec_ram.asl | 3 |
2 files changed, 14 insertions, 6 deletions
diff --git a/src/ec/google/wilco/acpi/ec.asl b/src/ec/google/wilco/acpi/ec.asl index cddfe3fc2e..67a698f6b6 100644 --- a/src/ec/google/wilco/acpi/ec.asl +++ b/src/ec/google/wilco/acpi/ec.asl @@ -20,6 +20,7 @@ Device (EC0) Name (_UID, 1) Name (_GPE, EC_SCI_GPI) Name (_STA, 0xf) + Name (DBUG, Zero) Name (_CRS, ResourceTemplate() { IO (Decode16, @@ -44,7 +45,7 @@ Device (EC0) ECPR = R (APWR) /* Indicate to EC that OS is ready for queries */ - W (ERDY, One) + W (ERDY, Arg1) /* Tell EC to stop emulating PS/2 mouse */ W (PS2M, Zero) @@ -71,7 +72,7 @@ Device (EC0) * Arg0 = EC field structure * Arg1 = Value to write */ - Method (ECRW, 2, Serialized) + Method (ECRW, 2, Serialized, 2) { If (!EREG) { Return (Zero) @@ -101,11 +102,15 @@ Device (EC0) } Local5 = EBIT (Arg0, Local3) - Printf ("ECRD %o = %o", Local0, Local5) + If (DBUG) { + Printf ("ECRD %o = %o", Local0, Local5) + } Return (Local5) } ElseIf (Local2 == WR) { /* Write byte */ - Printf ("ECWR %o = %o", Local0, Arg1) + If (DBUG) { + Printf ("ECWR %o = %o", Local0, Arg1) + } BYT1 = Arg1 } Return (Zero) @@ -115,7 +120,7 @@ Device (EC0) * Read a field from EC * Arg0 = EC field structure */ - Method (R, 1, Serialized) + Method (R, 1, Serialized, 2) { Return (ECRW (Arg0, Zero)) } @@ -125,7 +130,7 @@ Device (EC0) * Arg0 = EC field structure * Arg1 = Value to write */ - Method (W, 2, Serialized) + Method (W, 2, Serialized, 2) { Return (ECRW (Arg0, Arg1)) } diff --git a/src/ec/google/wilco/acpi/ec_ram.asl b/src/ec/google/wilco/acpi/ec_ram.asl index e2b6a93e1b..6ea2366b0a 100644 --- a/src/ec/google/wilco/acpi/ec_ram.asl +++ b/src/ec/google/wilco/acpi/ec_ram.asl @@ -81,6 +81,9 @@ Name (WRTC, Package () { 0x09, 0x20, RD }) /* Wake: RTC */ Name (WBAT, Package () { 0x09, 0x80, RD }) /* Wake: Low Battery */ Name (EVT3, Package () { 0x0b, 0xff, RD }) /* Event 3 */ +Name (E3CP, Package () { 0x0b, 0x08, RD }) /* CS Power Button */ +Name (E3TH, Package () { 0x0b, 0x10, RD }) /* Thermal Event */ + Name (EVT4, Package () { 0x0c, 0xff, RD }) /* Event 4 */ Name (BCST, Package () { 0x10, 0xff, RD }) /* BCACHE: BST */ |