superio/acpi: Replace Store(a,b) with ASL 2.0 syntax

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

Change-Id: Ibbecba97dd1628889539c2962dd31964c252c8bb
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70631
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 02:34:43 +01:00
parent 18af706d50
commit facf7d077c
5 changed files with 27 additions and 27 deletions

View File

@ -44,18 +44,18 @@
#define PNP_GENERIC_STA(LDN) \
ENTER_CONFIG_MODE (LDN)\
If (PNP_DEVICE_ACTIVE) {\
Store (DEVICE_PRESENT_ACTIVE, Local0)\
Local0 = DEVICE_PRESENT_ACTIVE \
}\
Else\
{\
Store (DEVICE_PRESENT_INACTIVE, Local0)\
Local0 = DEVICE_PRESENT_INACTIVE \
}\
EXIT_CONFIG_MODE ()\
Return (Local0)\
#define PNP_GENERIC_DIS(LDN) \
ENTER_CONFIG_MODE (LDN)\
Store (Zero, PNP_DEVICE_ACTIVE)\
PNP_DEVICE_ACTIVE = Zero \
EXIT_CONFIG_MODE ()\
@ -63,7 +63,7 @@
* Current power state (returns the chip's state)
*/
#define PNP_DEFAULT_PSC \
Store(^^_PSC (), Local0)\
Local0 = ^^_PSC () \
Return (Local0)
/*
@ -76,10 +76,10 @@
* bit
*/
#define PNP_GENERIC_PSC(PM_REG, PM_VAL, PM_LDN) \
Store(^^_PSC (), Local0)\
Local0 = ^^_PSC () \
If (Local0) { Return (Local0) }\
ENTER_CONFIG_MODE (PM_LDN)\
Store (PM_REG, Local0)\
Local0 = PM_REG \
EXIT_CONFIG_MODE ()\
If (Local0 == PM_VAL) { Return (3) }\
Else { Return (0) }\
@ -87,13 +87,13 @@
/* Disable power saving mode */
#define PNP_GENERIC_PS0(PM_REG, PM_VAL, PM_LDN) \
ENTER_CONFIG_MODE (PM_LDN)\
Store (Not(PM_VAL), PM_REG)\
PM_REG = Not(PM_VAL) \
EXIT_CONFIG_MODE ()
/* Enable power saving mode */
#define PNP_GENERIC_PS3(PM_REG, PM_VAL, PM_LDN) \
ENTER_CONFIG_MODE (PM_LDN)\
Store (PM_VAL, PM_REG)\
PM_REG = PM_VAL \
EXIT_CONFIG_MODE ()
@ -103,8 +103,8 @@
CreateWordField (RESOURCE_TEMPLATE, IO_TAG._MIN, IO_TAG##I)\
CreateWordField (RESOURCE_TEMPLATE, IO_TAG._MAX, IO_TAG##A)\
Or (ShiftLeft (IO_FROM##_HIGH_BYTE, 8), IO_FROM##_LOW_BYTE, Local0)\
Store (Local0, IO_TAG##I)\
Store (Local0, IO_TAG##A)
IO_TAG##I = Local0 \
IO_TAG##A = Local0
#define PNP_READ_IRQ(IRQ_FROM, RESOURCE_TEMPLATE, IRQ_TAG) \
CreateWordField (RESOURCE_TEMPLATE, IRQ_TAG._INT, IRQ_TAG##W)\
@ -116,8 +116,8 @@
#define PNP_WRITE_IO(IO_TO, RESOURCE, IO_TAG) \
CreateWordField (RESOURCE, IO_TAG._MIN, IO_TAG##I)\
Store (And(IO_TAG##I, 0xff), IO_TO##_LOW_BYTE)\
Store (IO_TAG##I >> 8, IO_TO##_HIGH_BYTE)
IO_TO##_LOW_BYTE = And(IO_TAG##I, 0xff) \
IO_TO##_HIGH_BYTE = IO_TAG##I >> 8
#define PNP_WRITE_IRQ(IRQ_TO, RESOURCE, IRQ_TAG) \
CreateWordField (RESOURCE, IRQ_TAG._INT, IRQ_TAG##W)\

View File

@ -35,19 +35,19 @@ Method (ENTER_CONFIG_MODE, 1)
{
Acquire (CONF_MODE_MUTEX, 0xFFFF)
#ifdef PNP_ENTER_MAGIC_1ST
Store (PNP_ENTER_MAGIC_1ST, PNP_ADDR_REG)
PNP_ADDR_REG = PNP_ENTER_MAGIC_1ST
#ifdef PNP_ENTER_MAGIC_2ND
Store (PNP_ENTER_MAGIC_2ND, PNP_ADDR_REG)
PNP_ADDR_REG = PNP_ENTER_MAGIC_2ND
#ifdef PNP_ENTER_MAGIC_3RD
Store (PNP_ENTER_MAGIC_3RD, PNP_ADDR_REG)
PNP_ADDR_REG = PNP_ENTER_MAGIC_3RD
#ifdef PNP_ENTER_MAGIC_4TH
Store (PNP_ENTER_MAGIC_4TH, PNP_ADDR_REG)
PNP_ADDR_REG = PNP_ENTER_MAGIC_4TH
#endif
#endif
#endif
#endif
If (Arg0 < PNP_NO_LDN_CHANGE) {
Store(Arg0, PNP_LOGICAL_DEVICE)
PNP_LOGICAL_DEVICE = Arg0
}
}
@ -58,10 +58,10 @@ Method (ENTER_CONFIG_MODE, 1)
Method (EXIT_CONFIG_MODE)
{
#ifdef PNP_EXIT_MAGIC_1ST
Store (PNP_EXIT_MAGIC_1ST, PNP_ADDR_REG)
PNP_ADDR_REG = PNP_EXIT_MAGIC_1ST
#endif
#if defined(PNP_EXIT_SPECIAL_REG) && defined(PNP_EXIT_SPECIAL_VAL)
Store (PNP_EXIT_SPECIAL_VAL, PNP_EXIT_SPECIAL_REG)
PNP_EXIT_SPECIAL_REG = PNP_EXIT_SPECIAL_VAL
#endif
Release (CONF_MODE_MUTEX)
}
@ -72,5 +72,5 @@ Method (EXIT_CONFIG_MODE)
*/
Method (SWITCH_LDN, 1)
{
Store(Arg0, PNP_LOGICAL_DEVICE)
PNP_LOGICAL_DEVICE = Arg0
}

View File

@ -168,7 +168,7 @@ Device (SUPERIO_ID(PN, SUPERIO_PNP_LDN)) {
#ifdef SUPERIO_PNP_DMA
PNP_WRITE_DMA(PNP_DMA0, Arg0, DM0)
#endif
Store (One, PNP_DEVICE_ACTIVE)
PNP_DEVICE_ACTIVE = One
EXIT_CONFIG_MODE ()
}

View File

@ -46,7 +46,7 @@ Device (SUPERIO_ID(KBD, SUPERIO_KBC_LDN)) {
Method (_DIS)
{
ENTER_CONFIG_MODE (SUPERIO_KBC_LDN)
Store (Zero, PNP_DEVICE_ACTIVE)
PNP_DEVICE_ACTIVE = Zero
EXIT_CONFIG_MODE ()
#if defined(SUPERIO_KBC_PS2LDN)
Notify (SUPERIO_ID(PS2, SUPERIO_KBC_PS2LDN), 1)
@ -95,7 +95,7 @@ Device (SUPERIO_ID(KBD, SUPERIO_KBC_LDN)) {
PNP_WRITE_IO(PNP_IO0, Arg0, IO0)
PNP_WRITE_IO(PNP_IO1, Arg0, IO1)
PNP_WRITE_IRQ(PNP_IRQ0, Arg0, IR0)
Store (One, PNP_DEVICE_ACTIVE)
PNP_DEVICE_ACTIVE = One
EXIT_CONFIG_MODE ()
#if defined(SUPERIO_KBC_PS2LDN)
Notify (SUPERIO_ID(PS2, SUPERIO_KBC_PS2LDN), 1)
@ -155,7 +155,7 @@ Device (SUPERIO_ID(PS2, SUPERIO_KBC_PS2LDN)) {
Method (_STA)
{
Store (^^SUPERIO_ID(KBD, SUPERIO_KBC_LDN)._STA (), Local0)
Local0 = ^^SUPERIO_ID(KBD, SUPERIO_KBC_LDN)._STA ()
If (Local0 == DEVICE_PRESENT_ACTIVE) {
PNP_GENERIC_STA(SUPERIO_KBC_PS2LDN)
} Else {
@ -166,7 +166,7 @@ Device (SUPERIO_ID(PS2, SUPERIO_KBC_PS2LDN)) {
Method (_DIS)
{
ENTER_CONFIG_MODE (SUPERIO_KBC_PS2LDN)
Store (Zero, PNP_DEVICE_ACTIVE)
PNP_DEVICE_ACTIVE = Zero
EXIT_CONFIG_MODE ()
}
@ -200,7 +200,7 @@ Device (SUPERIO_ID(PS2, SUPERIO_KBC_PS2LDN)) {
})
ENTER_CONFIG_MODE (SUPERIO_KBC_PS2LDN)
PNP_WRITE_IRQ(PNP_IRQ0, Arg0, IR1)
Store (One, PNP_DEVICE_ACTIVE)
PNP_DEVICE_ACTIVE = One
EXIT_CONFIG_MODE ()
}
}

View File

@ -112,7 +112,7 @@ Device (SUPERIO_ID(SER, SUPERIO_UART_LDN)) {
ENTER_CONFIG_MODE (SUPERIO_UART_LDN)
PNP_WRITE_IO(PNP_IO0, Arg0, IO0)
PNP_WRITE_IRQ(PNP_IRQ0, Arg0, IR0)
Store (One, PNP_DEVICE_ACTIVE)
PNP_DEVICE_ACTIVE = One
EXIT_CONFIG_MODE ()
}
}