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@das-labor.org> Reviewed-on: https://review.coreboot.org/27710 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
This commit is contained in:
parent
e67f626664
commit
dbf5a5d0f8
|
@ -75,6 +75,20 @@ Device(EC)
|
|||
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()
|
||||
|
|
|
@ -157,6 +157,9 @@ Device (HKEY)
|
|||
Return (\_SB.PCI0.LPCB.EC.GSTS)
|
||||
}
|
||||
|
||||
/* Set to one on first boot */
|
||||
Name (INIT, 0)
|
||||
|
||||
/* Has thinkpad_acpi module loaded */
|
||||
Name (HAST, 0)
|
||||
|
||||
|
@ -304,15 +307,6 @@ Device (HKEY)
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Store initial state
|
||||
*/
|
||||
Method (_INI, 0, NotSerialized)
|
||||
{
|
||||
Store (\_SB.PCI0.LPCB.EC.BTEB, WBDC)
|
||||
Store (\_SB.PCI0.LPCB.EC.WWEB, WWAN)
|
||||
}
|
||||
|
||||
/*
|
||||
* Called from _WAK
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue