summaryrefslogtreecommitdiffstats
path: root/src/ec
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2022-03-05 10:28:04 +0000
committerFelix Held <felix-coreboot@felixheld.de>2022-03-10 15:06:59 +0000
commitf58134b4ca4df2b0491cda7f44c261af6e2462f0 (patch)
treee46860036111b97056da3b3964d2a73e432c8452 /src/ec
parent700b5155ac45fc4ab9fc7d8fbdb21d6fe8d3f9a8 (diff)
downloadcoreboot-f58134b4ca4df2b0491cda7f44c261af6e2462f0.tar.gz
coreboot-f58134b4ca4df2b0491cda7f44c261af6e2462f0.tar.bz2
coreboot-f58134b4ca4df2b0491cda7f44c261af6e2462f0.zip
ec/starlabs: Store the correct value for KLSE 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: I62e0fc3b6fcae72f2d8eacf37a390b4e4b1f0783 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62605 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/starlabs/merlin/acpi/suspend.asl17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/ec/starlabs/merlin/acpi/suspend.asl b/src/ec/starlabs/merlin/acpi/suspend.asl
index 9f88a05ef681..a753ba630a01 100644
--- a/src/ec/starlabs/merlin/acpi/suspend.asl
+++ b/src/ec/starlabs/merlin/acpi/suspend.asl
@@ -26,8 +26,21 @@ Method (RPTS, 1, Serialized)
\_SB.PCI0.LPCB.FLKC =
\_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.FLKE))
- \_SB.PCI0.LPCB.KLSC =
- \_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.KLSE))
+
+ Switch (ToInteger (\_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.KLSE))))
+ {
+ // 0x00 == Disabled == 0x00
+ // 0xdd == Enabled == 0x01
+ Case (0x00)
+ {
+ \_SB.PCI0.LPCB.KLSC = 0x00
+ }
+ Case (0xdd)
+ {
+ \_SB.PCI0.LPCB.KLSC = 0x01
+ }
+ }
+
\_SB.PCI0.LPCB.KLBC =
\_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.KLBE))
}