Felix Held has submitted this change. ( https://review.coreboot.org/c/coreboot/+/62334 )
Change subject: ec/starlabs/merlin: Use ECRD function ......................................................................
ec/starlabs/merlin: Use ECRD function
Use ECRD function, instead of getting raw values from emem, to avoid a lack of syncronisation as it uses a mutex.
Signed-off-by: Sean Rhodes sean@starlabs.systems Change-Id: I31113ef9af3a1e171e3e1f226e7adcfa0fbce61b Reviewed-on: https://review.coreboot.org/c/coreboot/+/62334 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Elyes Haouas ehaouas@noos.fr Reviewed-by: Andy Pont andy.pont@sdcsystems.com Reviewed-by: Paul Menzel paulepanter@mailbox.org Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/ec/starlabs/merlin/acpi/ac.asl M src/ec/starlabs/merlin/acpi/lid.asl M src/ec/starlabs/merlin/acpi/suspend.asl 3 files changed, 10 insertions(+), 6 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Elyes Haouas: Looks good to me, but someone else must approve Angel Pons: Looks good to me, approved Andy Pont: Looks good to me, but someone else must approve
diff --git a/src/ec/starlabs/merlin/acpi/ac.asl b/src/ec/starlabs/merlin/acpi/ac.asl index 847f872e..01dcca9 100644 --- a/src/ec/starlabs/merlin/acpi/ac.asl +++ b/src/ec/starlabs/merlin/acpi/ac.asl @@ -9,7 +9,7 @@ } Method (_PSR, 0) { - PWRS = ECPS & 0x01 + PWRS = (ECRD (RefOf(ECPS)) & 0x01) Return (PWRS) } Method (_PCL, 0) diff --git a/src/ec/starlabs/merlin/acpi/lid.asl b/src/ec/starlabs/merlin/acpi/lid.asl index 936eeed..0eaa2c5 100644 --- a/src/ec/starlabs/merlin/acpi/lid.asl +++ b/src/ec/starlabs/merlin/acpi/lid.asl @@ -11,6 +11,6 @@ { // 0x00 == Closed // 0x01 == Open - Return (^^LSTE) + Return (ECRD (RefOf (LSTE))) } } diff --git a/src/ec/starlabs/merlin/acpi/suspend.asl b/src/ec/starlabs/merlin/acpi/suspend.asl index 08ca7871..2dae8da 100644 --- a/src/ec/starlabs/merlin/acpi/suspend.asl +++ b/src/ec/starlabs/merlin/acpi/suspend.asl @@ -7,10 +7,14 @@ If ((Arg0 == 0x04) || (Arg0 == 0x05)) { /* 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 + _SB.PCI0.LPCB.TPLC = + _SB.PCI0.LPCB.EC.ECRD (RefOf (_SB.PCI0.LPCB.EC.TPLE)) + _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)) + _SB.PCI0.LPCB.KLBC = + _SB.PCI0.LPCB.EC.ECRD (RefOf (_SB.PCI0.LPCB.EC.KLBE)) } }