summaryrefslogtreecommitdiff
path: root/src/ec/starlabs/merlin/acpi
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2021-12-16 09:18:12 +0000
committerFelix Held <felix-coreboot@felixheld.de>2022-02-15 23:44:16 +0000
commit45f9ca48247085ba1f67e67aef1545bcacb788a2 (patch)
tree8d34f8cd47bf9c7558cbb9a85d335a071479ef4f /src/ec/starlabs/merlin/acpi
parent1dc1a56a5d26892c1eb658425c9697a6d82284aa (diff)
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 <sean@starlabs.systems> Change-Id: I998d5509cd5e95736468f88663a1423217cf6ddf Reviewed-on: https://review.coreboot.org/c/coreboot/+/60165 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Diffstat (limited to 'src/ec/starlabs/merlin/acpi')
-rw-r--r--src/ec/starlabs/merlin/acpi/suspend.asl15
1 files changed, 11 insertions, 4 deletions
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
}