Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/62604 )
Change subject: ec/starlabs: Store the correct value for TPLE when suspending ......................................................................
ec/starlabs: Store the correct value for TPLE when suspending
The current code will read the raw value from the EC, which doesn't match the respective setting in CMOS.
Switch argument will store the correct value.
Signed-off-by: Sean Rhodes sean@starlabs.systems Change-Id: I921be8aea55b95f1ba233d2640d9bae80f8c3703 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62604 Reviewed-by: Angel Pons th3fanbus@gmail.com Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/ec/starlabs/merlin/acpi/suspend.asl 1 file changed, 19 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Angel Pons: Looks good to me, approved
diff --git a/src/ec/starlabs/merlin/acpi/suspend.asl b/src/ec/starlabs/merlin/acpi/suspend.asl index 4389729..9f88a05 100644 --- a/src/ec/starlabs/merlin/acpi/suspend.asl +++ b/src/ec/starlabs/merlin/acpi/suspend.asl @@ -5,8 +5,25 @@ If ((Arg0 == 0x04) || (Arg0 == 0x05)) { /* Store current EC settings in CMOS */ - _SB.PCI0.LPCB.TPLC = - _SB.PCI0.LPCB.EC.ECRD (RefOf (_SB.PCI0.LPCB.EC.TPLE)) + Switch (ToInteger (_SB.PCI0.LPCB.EC.ECRD (RefOf (_SB.PCI0.LPCB.EC.TPLE)))) + { + // 0x00 == Enabled == 0x00 + // 0x11 == Re-enabled == 0x00 + // 0x22 == Disabled == 0x01 + Case (0x00) + { + _SB.PCI0.LPCB.TPLC = 0x00 + } + Case (0x11) + { + _SB.PCI0.LPCB.TPLC = 0x00 + } + Case (0x22) + { + _SB.PCI0.LPCB.TPLC = 0x01 + } + } + _SB.PCI0.LPCB.FLKC = _SB.PCI0.LPCB.EC.ECRD (RefOf (_SB.PCI0.LPCB.EC.FLKE)) _SB.PCI0.LPCB.KLSC =