[coreboot-gerrit] Change in ...coreboot[master]: ec/google/wilco/acpi: Fix issues and clean up

Patrick Georgi (Code Review) gerrit at coreboot.org
Tue Dec 4 11:20:49 CET 2018


Patrick Georgi has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/29760 )

Change subject: ec/google/wilco/acpi: Fix issues and clean up
......................................................................

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 at google.com>
Reviewed-on: https://review.coreboot.org/c/29760
Reviewed-by: Furquan Shaikh <furquan at google.com>
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
---
M src/ec/google/wilco/acpi/ec.asl
M src/ec/google/wilco/acpi/ec_ram.asl
2 files changed, 14 insertions(+), 6 deletions(-)

Approvals:
  build bot (Jenkins): Verified
  Furquan Shaikh: Looks good to me, approved



diff --git a/src/ec/google/wilco/acpi/ec.asl b/src/ec/google/wilco/acpi/ec.asl
index cddfe3f..67a698f 100644
--- a/src/ec/google/wilco/acpi/ec.asl
+++ b/src/ec/google/wilco/acpi/ec.asl
@@ -20,6 +20,7 @@
 	Name (_UID, 1)
 	Name (_GPE, EC_SCI_GPI)
 	Name (_STA, 0xf)
+	Name (DBUG, Zero)
 
 	Name (_CRS, ResourceTemplate() {
 		IO (Decode16,
@@ -44,7 +45,7 @@
 		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 @@
 	 *  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 @@
 			}
 
 			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 @@
 	 * 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 @@
 	 *  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 e2b6a93..6ea2366 100644
--- a/src/ec/google/wilco/acpi/ec_ram.asl
+++ b/src/ec/google/wilco/acpi/ec_ram.asl
@@ -81,6 +81,9 @@
 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 */

-- 
To view, visit https://review.coreboot.org/c/coreboot/+/29760
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ic65ebbb6a6151444c47b4aeff7429e186856c49a
Gerrit-Change-Number: 29760
Gerrit-PatchSet: 3
Gerrit-Owner: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie at chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan at google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi at google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181204/ebff0481/attachment.html>


More information about the coreboot-gerrit mailing list