[coreboot-gerrit] Change in coreboot[master]: ec/lenovo/h8/acpi: Fix ACPI error in _INI

Patrick Rudolph (Code Review) gerrit at coreboot.org
Sun Jul 29 08:11:48 CEST 2018


Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/27710


Change subject: ec/lenovo/h8/acpi: Fix ACPI error in _INI
......................................................................

ec/lenovo/h8/acpi: Fix ACPI error in _INI

Store the power on defaults in the _REG method after the ERAM region
is ready for use. It might not be ready when accessed from _INI.

Tested on Lenovo T430.

Change-Id: I70f22f8ac61dd850180fa159313bb0f8e4ab31d9
Signed-off-by: Patrick Rudolph <siro at das-labor.org>
---
M src/ec/lenovo/h8/acpi/ec.asl
M src/ec/lenovo/h8/acpi/thinkpad.asl
2 files changed, 17 insertions(+), 9 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/10/27710/1

diff --git a/src/ec/lenovo/h8/acpi/ec.asl b/src/ec/lenovo/h8/acpi/ec.asl
index 8a1b9c4..327a2cf 100644
--- a/src/ec/lenovo/h8/acpi/ec.asl
+++ b/src/ec/lenovo/h8/acpi/ec.asl
@@ -75,6 +75,20 @@
 				DKR3, 1		/* Dock register 3 */
 	}
 
+	/* Called on OperationRegion driver changes */
+	Method (_REG, 2, NotSerialized)
+	{
+		/* Wait for ERAM driver loaded */
+		if (LEqual(Arg1, One)) {
+			/* Fill HKEY defaults on first boot */
+			if (LEqual(^HKEY.INIT, Zero)) {
+				Store (BTEB, ^HKEY.WBDC)
+				Store (WWEB, ^HKEY.WWAN)
+				Store (One, ^HKEY.INIT)
+			}
+		}
+	}
+
 	Method (_CRS, 0, Serialized)
 	{
 		Name (ECMD, ResourceTemplate()
diff --git a/src/ec/lenovo/h8/acpi/thinkpad.asl b/src/ec/lenovo/h8/acpi/thinkpad.asl
index 8fb5716..1997d08 100644
--- a/src/ec/lenovo/h8/acpi/thinkpad.asl
+++ b/src/ec/lenovo/h8/acpi/thinkpad.asl
@@ -157,6 +157,9 @@
 		Return (\_SB.PCI0.LPCB.EC.GSTS)
 	}
 
+	/* Set to one on first boot */
+	Name (INIT, 0)
+
 	/* Has thinkpad_acpi module loaded */
 	Name (HAST, 0)
 
@@ -305,15 +308,6 @@
 	}
 
 	/*
-	 * Store initial state
-	 */
-	Method (_INI, 0, NotSerialized)
-	{
-		Store (\_SB.PCI0.LPCB.EC.BTEB, WBDC)
-		Store (\_SB.PCI0.LPCB.EC.WWEB, WWAN)
-	}
-
-	/*
 	 * Called from _WAK
 	 */
 	Method (WAKE, 1)

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

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I70f22f8ac61dd850180fa159313bb0f8e4ab31d9
Gerrit-Change-Number: 27710
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <siro at das-labor.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180729/cea4016c/attachment.html>


More information about the coreboot-gerrit mailing list