ec/lenovo/h8/acpi: Replace Store(a,b) with ASL 2.0 syntax

Replace `Store (a, b)` with `b = a`.

Change-Id: I1c68816f47aa3ed0ab3bf55d4cfde71d5838d051
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70637
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
This commit is contained in:
Felix Singer 2022-12-12 04:54:01 +01:00
parent 2f308d4957
commit f45a6c2a50
7 changed files with 59 additions and 59 deletions

View File

@ -15,8 +15,8 @@ Device(AC)
Method(_PSR, 0, NotSerialized) Method(_PSR, 0, NotSerialized)
{ {
Store(HPAC, Local0) Local0 = HPAC
Store(Local0, \PWRS) \PWRS = Local0
\PNOT() \PNOT()
return (Local0) return (Local0)
} }

View File

@ -9,5 +9,5 @@ Field(ERAM, ByteAcc, NoLock, Preserve)
Method(BEEP, 1, NotSerialized) Method(BEEP, 1, NotSerialized)
{ {
Store (Arg0, SNDS) SNDS = Arg0
} }

View File

@ -67,9 +67,9 @@ Device(EC)
if (Arg1 == 1) { if (Arg1 == 1) {
/* Fill HKEY defaults on first boot */ /* Fill HKEY defaults on first boot */
if (^HKEY.INIT == 0) { if (^HKEY.INIT == 0) {
Store (BTEB, ^HKEY.WBDC) ^HKEY.WBDC = BTEB
Store (WWEB, ^HKEY.WWAN) ^HKEY.WWAN = WWEB
Store (One, ^HKEY.INIT) ^HKEY.INIT = One
} }
} }
} }
@ -86,7 +86,7 @@ Device(EC)
Method (TLED, 1, NotSerialized) Method (TLED, 1, NotSerialized)
{ {
Store(Arg0, LEDS) LEDS = Arg0
} }
/* Not used for coreboot. Provided for compatibility with thinkpad-acpi. */ /* Not used for coreboot. Provided for compatibility with thinkpad-acpi. */
@ -101,24 +101,24 @@ Device(EC)
Method (MUTE, 1, NotSerialized) Method (MUTE, 1, NotSerialized)
{ {
Store(Arg0, AMUT) AMUT = Arg0
} }
Method (RADI, 1, NotSerialized) Method (RADI, 1, NotSerialized)
{ {
Store(Arg0, WLEB) WLEB = Arg0
Store(Arg0, WWEB) WWEB = Arg0
Store(Arg0, BTEB) BTEB = Arg0
} }
Method (USBP, 1, NotSerialized) Method (USBP, 1, NotSerialized)
{ {
Store(Arg0, USPW) USPW = Arg0
} }
Method (LGHT, 1, NotSerialized) Method (LGHT, 1, NotSerialized)
{ {
Store(Arg0, KBLT) KBLT = Arg0
} }
@ -157,7 +157,7 @@ Device(EC)
Method(_Q27, 0, NotSerialized) Method(_Q27, 0, NotSerialized)
{ {
Notify (AC, 0x80) Notify (AC, 0x80)
Store(0x50, EVNT) EVNT = 0x50
\PNOT() \PNOT()
} }
@ -318,11 +318,11 @@ Device(EC)
Method (FANE, 1, Serialized) Method (FANE, 1, Serialized)
{ {
If (Arg0) { If (Arg0) {
Store (One, FAND) FAND = One
Store (Zero, FANA) FANA = Zero
} Else { } Else {
Store (Zero, FAND) FAND = Zero
Store (One, FANA) FANA = One
} }
} }

View File

@ -27,9 +27,9 @@ Device(LID)
Method(_PSW, 1, NotSerialized) Method(_PSW, 1, NotSerialized)
{ {
if (Arg0) { if (Arg0) {
Store(1, WKLD) WKLD = 1
} else { } else {
Store(0, WKLD) WKLD = 0
} }
} }
} }

View File

@ -20,11 +20,11 @@ Device(SLPB)
Method(_PSW, 1, NotSerialized) Method(_PSW, 1, NotSerialized)
{ {
if (Arg0) { if (Arg0) {
Store(6, FNKY) /* Fn key acts as wake button */ FNKY = 6 /* Fn key acts as wake button */
Store(1, WKFN) WKFN = 1
} else { } else {
Store(0, FNKY) /* Fn key normal operation */ FNKY = 0 /* Fn key normal operation */
Store(0, WKFN) WKFN = 0
} }
} }
} }

View File

@ -46,7 +46,7 @@ External (\PPKG, MethodObj)
/* Get critical temperature in degree celsius */ /* Get critical temperature in degree celsius */
Method (GCRT, 0, NotSerialized) { Method (GCRT, 0, NotSerialized) {
Store (\TCRT, Local0) Local0 = \TCRT
if (Local0 > 0) { if (Local0 > 0) {
Return (Local0) Return (Local0)
} }
@ -55,7 +55,7 @@ External (\PPKG, MethodObj)
/* Get passive temperature in degree celsius */ /* Get passive temperature in degree celsius */
Method (GPSV, 0, NotSerialized) { Method (GPSV, 0, NotSerialized) {
Store (\TPSV, Local0) Local0 = \TPSV
if (Local0 > 0) { if (Local0 > 0) {
Return (Local0) Return (Local0)
} }
@ -76,13 +76,13 @@ External (\PPKG, MethodObj)
If (!MEB1 && \_SB.PCI0.LPCB.EC.TMP0 == 128) { If (!MEB1 && \_SB.PCI0.LPCB.EC.TMP0 == 128) {
Return (C2K(40)) Return (C2K(40))
} }
Store (1, MEB1) MEB1 = 1
#endif #endif
Return (C2K(\_SB.PCI0.LPCB.EC.TMP0)) Return (C2K(\_SB.PCI0.LPCB.EC.TMP0))
} }
Method (_AC0) { Method (_AC0) {
Store (GPSV (), Local0) Local0 = GPSV ()
/* Active fan 10 degree below passive threshold */ /* Active fan 10 degree below passive threshold */
Local0 -= 10 Local0 -= 10
@ -113,13 +113,13 @@ External (\PPKG, MethodObj)
*/ */
Method (_ON) { Method (_ON) {
\_SB.PCI0.LPCB.EC.FANE(One) \_SB.PCI0.LPCB.EC.FANE(One)
Store (One, \FLVL) \FLVL = One
Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG) Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG)
} }
Method (_OFF) { Method (_OFF) {
\_SB.PCI0.LPCB.EC.FANE(Zero) \_SB.PCI0.LPCB.EC.FANE(Zero)
Store (Zero, \FLVL) \FLVL = Zero
Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG) Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG)
} }
} }
@ -163,7 +163,7 @@ External (\PPKG, MethodObj)
If (!MEB2 && \_SB.PCI0.LPCB.EC.TMP1 == 128) { If (!MEB2 && \_SB.PCI0.LPCB.EC.TMP1 == 128) {
Return (C2K(40)) Return (C2K(40))
} }
Store (1, MEB2) MEB2 = 1
#endif #endif
Return (C2K(\_SB.PCI0.LPCB.EC.TMP1)) Return (C2K(\_SB.PCI0.LPCB.EC.TMP1))
} }

View File

@ -34,15 +34,15 @@ Device (HKEY)
/* Retrieve event. */ /* Retrieve event. */
Method (MHKP, 0, NotSerialized) Method (MHKP, 0, NotSerialized)
{ {
Store (BTN, Local0) Local0 = BTN
If (Local0 != 0) { If (Local0 != 0) {
Store (Zero, BTN) BTN = Zero
Local0 += 0x1000 Local0 += 0x1000
Return (Local0) Return (Local0)
} }
Store (BTAB, Local0) Local0 = BTAB
If (Local0 != 0) { If (Local0 != 0) {
Store (Zero, BTAB) BTAB = Zero
Local0 += 0x5000 Local0 += 0x5000
Return (Local0) Return (Local0)
} }
@ -53,7 +53,7 @@ Device (HKEY)
Method (RHK, 1, NotSerialized) { Method (RHK, 1, NotSerialized) {
ShiftLeft (One, Arg0 - 1, Local0) ShiftLeft (One, Arg0 - 1, Local0)
If (EMSK & Local0) { If (EMSK & Local0) {
Store (Arg0, BTN) BTN = Arg0
Notify (HKEY, 0x80) Notify (HKEY, 0x80)
} }
} }
@ -62,7 +62,7 @@ Device (HKEY)
Method (RTAB, 1, NotSerialized) { Method (RTAB, 1, NotSerialized) {
ShiftLeft (One, Arg0 - 1, Local0) ShiftLeft (One, Arg0 - 1, Local0)
If (ETAB & Local0) { If (ETAB & Local0) {
Store (Arg0, BTAB) BTAB = Arg0
Notify (HKEY, 0x80) Notify (HKEY, 0x80)
} }
} }
@ -70,15 +70,15 @@ Device (HKEY)
/* Enable/disable all events. */ /* Enable/disable all events. */
Method (MHKC, 1, NotSerialized) { Method (MHKC, 1, NotSerialized) {
If (Arg0) { If (Arg0) {
Store (DHKN, EMSK) EMSK = DHKN
Store (Ones, ETAB) ETAB = Ones
} }
Else Else
{ {
Store (Zero, EMSK) EMSK = Zero
Store (Zero, ETAB) ETAB = Zero
} }
Store (Arg0, EN) EN = Arg0
} }
/* Enable/disable event. */ /* Enable/disable event. */
@ -95,7 +95,7 @@ Device (HKEY)
} }
If (EN) If (EN)
{ {
Store (DHKN, EMSK) EMSK = DHKN
} }
} }
} }
@ -115,7 +115,7 @@ Device (HKEY)
/* Mute audio */ /* Mute audio */
Method (SSMS, 1, NotSerialized) Method (SSMS, 1, NotSerialized)
{ {
Store(Arg0, ALMT) ALMT = Arg0
} }
/* Control mute microphone LED */ /* Control mute microphone LED */
@ -159,10 +159,10 @@ Device (HKEY)
*/ */
Method (GBDC, 0) Method (GBDC, 0)
{ {
Store (One, HAST) HAST = One
If (HBDC) { If (HBDC) {
Store(One, Local0) Local0 = One
If(\_SB.PCI0.LPCB.EC.BTEB) If(\_SB.PCI0.LPCB.EC.BTEB)
{ {
Or(Local0, 2, Local0) Or(Local0, 2, Local0)
@ -181,13 +181,13 @@ Device (HKEY)
*/ */
Method (SBDC, 1) Method (SBDC, 1)
{ {
Store (One, HAST) HAST = One
If (HBDC) { If (HBDC) {
ShiftRight (Arg0 & 2, 1, Local0) ShiftRight (Arg0 & 2, 1, Local0)
Store (Local0, \_SB.PCI0.LPCB.EC.BTEB) \_SB.PCI0.LPCB.EC.BTEB = Local0
ShiftRight (Arg0 & 4, 2, Local0) ShiftRight (Arg0 & 4, 2, Local0)
Store (Local0, WBDC) WBDC = Local0
} }
} }
@ -201,10 +201,10 @@ Device (HKEY)
*/ */
Method (GWAN, 0) Method (GWAN, 0)
{ {
Store (One, HAST) HAST = One
If (HWAN) { If (HWAN) {
Store(One, Local0) Local0 = One
If(\_SB.PCI0.LPCB.EC.WWEB) If(\_SB.PCI0.LPCB.EC.WWEB)
{ {
Or(Local0, 2, Local0) Or(Local0, 2, Local0)
@ -223,11 +223,11 @@ Device (HKEY)
*/ */
Method (SWAN, 1) Method (SWAN, 1)
{ {
Store (One, HAST) HAST = One
If (HWAN) { If (HWAN) {
ShiftRight (Arg0 & 2, 1, Local0) ShiftRight (Arg0 & 2, 1, Local0)
Store (Local0, \_SB.PCI0.LPCB.EC.WWEB) \_SB.PCI0.LPCB.EC.WWEB = Local0
ShiftRight (Arg0 & 4, 2, WWAN) ShiftRight (Arg0 & 4, 2, WWAN)
} }
} }
@ -241,7 +241,7 @@ Device (HKEY)
Method (MLCG, 1) Method (MLCG, 1)
{ {
If (HKBL) { If (HKBL) {
Store (0x200, Local0) Local0 = 0x200
/* FIXME: Support 2bit brightness control */ /* FIXME: Support 2bit brightness control */
Or (Local0, \_SB.PCI0.LPCB.EC.KBLT, Local0) Or (Local0, \_SB.PCI0.LPCB.EC.KBLT, Local0)
Return (Local0) Return (Local0)
@ -258,7 +258,7 @@ Device (HKEY)
{ {
If (HKBL) { If (HKBL) {
/* FIXME: Support 2bit brightness control */ /* FIXME: Support 2bit brightness control */
Store (Arg0 & 1, \_SB.PCI0.LPCB.EC.WWEB) \_SB.PCI0.LPCB.EC.WWEB = Arg0 & 1
} }
} }
@ -270,7 +270,7 @@ Device (HKEY)
Method (GUWB, 0) Method (GUWB, 0)
{ {
If (HUWB) { If (HUWB) {
Store (One, Local0) Local0 = One
If(\_SB.PCI0.LPCB.EC.UWBE) If(\_SB.PCI0.LPCB.EC.UWBE)
{ {
Or(Local0, 2, Local0) Or(Local0, 2, Local0)
@ -289,7 +289,7 @@ Device (HKEY)
{ {
If (HUWB) { If (HUWB) {
ShiftRight (Arg0 & 2, 1, Local0) ShiftRight (Arg0 & 2, 1, Local0)
Store (Local0, \_SB.PCI0.LPCB.EC.UWBE) \_SB.PCI0.LPCB.EC.UWBE = Local0
} }
} }
@ -299,8 +299,8 @@ Device (HKEY)
Method (WAKE, 1) Method (WAKE, 1)
{ {
If (HAST) { If (HAST) {
Store (WBDC, \_SB.PCI0.LPCB.EC.BTEB) \_SB.PCI0.LPCB.EC.BTEB = WBDC
Store (WWAN, \_SB.PCI0.LPCB.EC.WWEB) \_SB.PCI0.LPCB.EC.WWEB = WWAN
} }
} }