ec/starlabs/merlin: Use ECWR function

Use ECWR function, instead of writing raw values to emem, to avoid a
lack of syncronisation as it uses a mutex.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I90cfd3e1752fe25493bd72ea6bcab1fd9318d2e3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62637
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
This commit is contained in:
Sean Rhodes 2022-03-07 07:48:21 +00:00 committed by Felix Held
parent 26cf0f954e
commit 18a7c0fc7a
1 changed files with 9 additions and 9 deletions

View File

@ -89,15 +89,15 @@ Method (RWAK, 1, Serialized)
// 0x01 == Disabled == 0x22 // 0x01 == Disabled == 0x22
Case (0x00) Case (0x00)
{ {
\_SB.PCI0.LPCB.EC.TPLE = 0x00 \_SB.PCI0.LPCB.EC.ECWR (0x00, RefOf(\_SB.PCI0.LPCB.EC.TPLE))
} }
Case (0x01) Case (0x01)
{ {
\_SB.PCI0.LPCB.EC.TPLE = 0x22 \_SB.PCI0.LPCB.EC.ECWR (0x22, RefOf(\_SB.PCI0.LPCB.EC.TPLE))
} }
} }
\_SB.PCI0.LPCB.EC.FLKE = \_SB.PCI0.LPCB.FLKC \_SB.PCI0.LPCB.EC.ECWR (\_SB.PCI0.LPCB.FLKC, RefOf(\_SB.PCI0.LPCB.EC.FLKE))
Switch (ToInteger (\_SB.PCI0.LPCB.KLSC)) Switch (ToInteger (\_SB.PCI0.LPCB.KLSC))
{ {
@ -105,11 +105,11 @@ Method (RWAK, 1, Serialized)
// 0x01 == Enabled == 0xdd // 0x01 == Enabled == 0xdd
Case (0x00) Case (0x00)
{ {
\_SB.PCI0.LPCB.EC.KLSE = 0x00 \_SB.PCI0.LPCB.EC.ECWR (0x00, RefOf(\_SB.PCI0.LPCB.EC.KLSE))
} }
Case (0x01) Case (0x01)
{ {
\_SB.PCI0.LPCB.EC.KLSE = 0xdd \_SB.PCI0.LPCB.EC.ECWR (0xdd, RefOf(\_SB.PCI0.LPCB.EC.KLSE))
} }
} }
@ -121,19 +121,19 @@ Method (RWAK, 1, Serialized)
// 0x03 == High == 0xaa // 0x03 == High == 0xaa
Case (0x00) Case (0x00)
{ {
\_SB.PCI0.LPCB.EC.KLBE = 0xdd \_SB.PCI0.LPCB.EC.ECWR (0xdd, RefOf(\_SB.PCI0.LPCB.EC.KLBE))
} }
Case (0x01) Case (0x01)
{ {
\_SB.PCI0.LPCB.EC.KLBE = 0xcc \_SB.PCI0.LPCB.EC.ECWR (0xcc, RefOf(\_SB.PCI0.LPCB.EC.KLBE))
} }
Case (0x02) Case (0x02)
{ {
\_SB.PCI0.LPCB.EC.KLBE = 0xbb \_SB.PCI0.LPCB.EC.ECWR (0xbb, RefOf(\_SB.PCI0.LPCB.EC.KLBE))
} }
Case (0x03) Case (0x03)
{ {
\_SB.PCI0.LPCB.EC.KLBE = 0xaa \_SB.PCI0.LPCB.EC.ECWR (0xaa, RefOf(\_SB.PCI0.LPCB.EC.KLBE))
} }
} }
} }