From 28a30426fece253e463f8d4ed3bd6b031a906a29 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Thu, 24 Feb 2022 10:44:59 +0000 Subject: ec/starlabs/merlin: Disable ACPI support last when suspending When entering suspend, ACPI support is disabled by setting OSFG to 0x00. This has been moved to be the final action, so it is after saving the current EC settings. Signed-off-by: Sean Rhodes Change-Id: I5705efab42d2fe0fd5abc6c17eeea46ead27db17 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62335 Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/ec/starlabs/merlin/acpi/suspend.asl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/ec/starlabs') diff --git a/src/ec/starlabs/merlin/acpi/suspend.asl b/src/ec/starlabs/merlin/acpi/suspend.asl index 2dae8dae68..f89e501a14 100644 --- a/src/ec/starlabs/merlin/acpi/suspend.asl +++ b/src/ec/starlabs/merlin/acpi/suspend.asl @@ -2,8 +2,6 @@ Method (RPTS, 1, NotSerialized) { - \_SB.PCI0.LPCB.EC.OSFG = 0x00 - If ((Arg0 == 0x04) || (Arg0 == 0x05)) { /* Store current EC settings in CMOS */ @@ -16,10 +14,20 @@ Method (RPTS, 1, NotSerialized) \_SB.PCI0.LPCB.KLBC = \_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.KLBE)) } + + /* + * Disable ACPI support. + * This should always be the last action before entering S4 or S5. + */ + \_SB.PCI0.LPCB.EC.OSFG = 0x00 } Method (RWAK, 1, Serialized) { + /* + * Enable ACPI support. + * This should always be the first action when exiting S4 or S5. + */ \_SB.PCI0.LPCB.EC.OSFG = 0x01 /* Restore EC settings from CMOS */ -- cgit v1.2.3