From 45f9ca48247085ba1f67e67aef1545bcacb788a2 Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Thu, 16 Dec 2021 09:18:12 +0000 Subject: ec/starlabs/merlin: Apply EC settings when suspending Currently, the settings from CMOS were written to the EC, which was pointless. Now, when suspending, the EC values are stored in CMOS when suspending and subsequently restored when waking. Signed-off-by: Sean Rhodes Change-Id: I998d5509cd5e95736468f88663a1423217cf6ddf Reviewed-on: https://review.coreboot.org/c/coreboot/+/60165 Tested-by: build bot (Jenkins) Reviewed-by: Matt DeVillier Reviewed-by: Paul Menzel --- src/ec/starlabs/merlin/acpi/suspend.asl | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 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 c4a92f232d..08ca787113 100644 --- a/src/ec/starlabs/merlin/acpi/suspend.asl +++ b/src/ec/starlabs/merlin/acpi/suspend.asl @@ -6,14 +6,21 @@ Method (RPTS, 1, NotSerialized) If ((Arg0 == 0x04) || (Arg0 == 0x05)) { - /* Store current EC settings */ - \_SB.PCI0.LPCB.EC.TPLE = \_SB.PCI0.LPCB.TPLC - \_SB.PCI0.LPCB.EC.FLKE = \_SB.PCI0.LPCB.FLKC - \_SB.PCI0.LPCB.EC.KLBE = \_SB.PCI0.LPCB.KLBC + /* Store current EC settings in CMOS */ + \_SB.PCI0.LPCB.TPLC = \_SB.PCI0.LPCB.EC.TPLE + \_SB.PCI0.LPCB.FLKC = \_SB.PCI0.LPCB.EC.FLKE + \_SB.PCI0.LPCB.KLSC = \_SB.PCI0.LPCB.EC.KLSE + \_SB.PCI0.LPCB.KLBC = \_SB.PCI0.LPCB.EC.KLBE } } Method (RWAK, 1, Serialized) { \_SB.PCI0.LPCB.EC.OSFG = 0x01 + + /* Restore EC settings from CMOS */ + \_SB.PCI0.LPCB.EC.TPLE = \_SB.PCI0.LPCB.TPLC + \_SB.PCI0.LPCB.EC.FLKE = \_SB.PCI0.LPCB.FLKC + \_SB.PCI0.LPCB.EC.KLSE = \_SB.PCI0.LPCB.KLSC + \_SB.PCI0.LPCB.EC.KLBE = \_SB.PCI0.LPCB.KLBC } -- cgit v1.2.3