diff options
author | Sean Rhodes <sean@starlabs.systems> | 2022-03-05 10:31:27 +0000 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-03-10 15:07:21 +0000 |
commit | 141e6fd2451c9e8bd13b81b24409db766610d755 (patch) | |
tree | 788d8f5b67576d0251504d94e8a1aaf0093284a5 /src | |
parent | f58134b4ca4df2b0491cda7f44c261af6e2462f0 (diff) |
ec/starlabs: Store the correct value for KLBE 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: Ic2a83df9a270de6d7bab295e732a6c13accbe17c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62606
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/starlabs/merlin/acpi/suspend.asl | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/src/ec/starlabs/merlin/acpi/suspend.asl b/src/ec/starlabs/merlin/acpi/suspend.asl index a753ba630a..81ae8d14f3 100644 --- a/src/ec/starlabs/merlin/acpi/suspend.asl +++ b/src/ec/starlabs/merlin/acpi/suspend.asl @@ -41,8 +41,29 @@ Method (RPTS, 1, Serialized) } } - \_SB.PCI0.LPCB.KLBC = - \_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.KLBE)) + Switch (ToInteger (\_SB.PCI0.LPCB.EC.ECRD (RefOf (\_SB.PCI0.LPCB.EC.KLBE)))) + { + // 0xdd == On == 0x00 + // 0xcc == Off == 0x01 + // 0xbb == Low == 0x02 + // 0xaa == High == 0x03 + Case (0xdd) + { + \_SB.PCI0.LPCB.KLBC = 0x00 + } + Case (0xcc) + { + \_SB.PCI0.LPCB.KLBC = 0x01 + } + Case (0xbb) + { + \_SB.PCI0.LPCB.KLBC = 0x02 + } + Case (0xaa) + { + \_SB.PCI0.LPCB.KLBC = 0x03 + } + } } /* |