aboutsummaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2022-03-05 10:46:07 +0000
committerFelix Held <felix-coreboot@felixheld.de>2022-03-10 15:08:14 +0000
commit26cf0f954e596b0f47763fda444ebf1abafbed69 (patch)
tree8e143b865bcb7aa0096cb3b38f5b5cf5a6499519 /src/ec
parent40455e94781c032906d04cb5326f095e1ecc2de9 (diff)
ec/starlabs: Write the correct value for KLBE when suspending
The current code will write the raw value from the CMOS, which doesn't match the respective setting in EC. Switch argument will write the correct value, and prevent the setting being reset. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I40dc78c743f4201a11ea0c26a8af716cab42b805 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62609 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/starlabs/merlin/acpi/suspend.asl24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/ec/starlabs/merlin/acpi/suspend.asl b/src/ec/starlabs/merlin/acpi/suspend.asl
index c65ca6d9a5..70a9bda6d4 100644
--- a/src/ec/starlabs/merlin/acpi/suspend.asl
+++ b/src/ec/starlabs/merlin/acpi/suspend.asl
@@ -113,5 +113,27 @@ Method (RWAK, 1, Serialized)
}
}
- \_SB.PCI0.LPCB.EC.KLBE = \_SB.PCI0.LPCB.KLBC
+ Switch (ToInteger (\_SB.PCI0.LPCB.KLBC))
+ {
+ // 0x00 == On == 0xdd
+ // 0x01 == Off == 0xcc
+ // 0x02 == Low == 0xbb
+ // 0x03 == High == 0xaa
+ Case (0x00)
+ {
+ \_SB.PCI0.LPCB.EC.KLBE = 0xdd
+ }
+ Case (0x01)
+ {
+ \_SB.PCI0.LPCB.EC.KLBE = 0xcc
+ }
+ Case (0x02)
+ {
+ \_SB.PCI0.LPCB.EC.KLBE = 0xbb
+ }
+ Case (0x03)
+ {
+ \_SB.PCI0.LPCB.EC.KLBE = 0xaa
+ }
+ }
}