HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46003 )
Change subject: superio/acpi: Convert *.asl to ASL 2.0 syntax ......................................................................
superio/acpi: Convert *.asl to ASL 2.0 syntax
Change-Id: I359bf81f14a35737688804f8ac1f0370307fa77b Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/superio/acpi/pnp.asl M src/superio/acpi/pnp_config.asl M src/superio/acpi/pnp_generic.asl M src/superio/acpi/pnp_kbc.asl M src/superio/acpi/pnp_uart.asl 5 files changed, 35 insertions(+), 35 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/03/46003/1
diff --git a/src/superio/acpi/pnp.asl b/src/superio/acpi/pnp.asl index d5a26a7..aa21692 100644 --- a/src/superio/acpi/pnp.asl +++ b/src/superio/acpi/pnp.asl @@ -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 = 0\ 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,24 +76,24 @@ * 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 (LEqual(Local0, PM_VAL)) { Return (3) }\ + If (Local0 == PM_VAL) { Return (3) }\ Else { Return (0) }\
/* 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 = ~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 ()
@@ -102,29 +102,29 @@ #define PNP_READ_IO(IO_FROM, RESOURCE_TEMPLATE, IO_TAG) \ 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) + Local0 = (IO_FROM##_HIGH_BYTE << 8) | IO_FROM##_LOW_BYTE\ + 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)\ - ShiftLeft (One, IRQ_FROM, IRQ_TAG##W) + IRQ_TAG##W = 1 << IRQ_FROM
#define PNP_READ_DMA(DMA_FROM, RESOURCE_TEMPLATE, DMA_TAG) \ CreateByteField (RESOURCE_TEMPLATE, DMA_TAG._DMA, DMA_TAG##W)\ - ShiftLeft (One, DMA_FROM, DMA_TAG##W) + DMA_TAG##W = 1 << DMA_FROM
#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 (ShiftRight(IO_TAG##I, 8), IO_TO##_HIGH_BYTE) + IO_TO##_LOW_BYTE = 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)\ - Subtract (FindSetLeftBit (IRQ_TAG##W), 1, IRQ_TO) + IRQ_TO = FindSetLeftBit (IRQ_TAG##W) - 1
#define PNP_WRITE_DMA(DMA_TO, RESOURCE, DMA_TAG) \ CreateByteField (RESOURCE, DMA_TAG._DMA, DMA_TAG##W)\ - Subtract (FindSetLeftBit (DMA_TAG##W), 1, DMA_TO) + DMA_TO = FindSetLeftBit (DMA_TAG##W) - 1
#endif diff --git a/src/superio/acpi/pnp_config.asl b/src/superio/acpi/pnp_config.asl index ff74153..5e7a076 100644 --- a/src/superio/acpi/pnp_config.asl +++ b/src/superio/acpi/pnp_config.asl @@ -35,19 +35,19 @@ { 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 (LLess(Arg0, PNP_NO_LDN_CHANGE)) { - Store(Arg0, PNP_LOGICAL_DEVICE) + If (Arg0 < PNP_NO_LDN_CHANGE) { + PNP_LOGICAL_DEVICE = Arg0 } }
@@ -58,10 +58,10 @@ 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 (SWITCH_LDN, 1) { - Store(Arg0, PNP_LOGICAL_DEVICE) + PNP_LOGICAL_DEVICE = Arg0 } diff --git a/src/superio/acpi/pnp_generic.asl b/src/superio/acpi/pnp_generic.asl index d0d9a2d..ac60e8a 100644 --- a/src/superio/acpi/pnp_generic.asl +++ b/src/superio/acpi/pnp_generic.asl @@ -168,7 +168,7 @@ #ifdef SUPERIO_PNP_DMA PNP_WRITE_DMA(PNP_DMA0, Arg0, DM0) #endif - Store (One, PNP_DEVICE_ACTIVE) + PNP_DEVICE_ACTIVE = 1 EXIT_CONFIG_MODE () } } diff --git a/src/superio/acpi/pnp_kbc.asl b/src/superio/acpi/pnp_kbc.asl index 22a0556..b0055be 100644 --- a/src/superio/acpi/pnp_kbc.asl +++ b/src/superio/acpi/pnp_kbc.asl @@ -46,7 +46,7 @@ Method (_DIS) { ENTER_CONFIG_MODE (SUPERIO_KBC_LDN) - Store (Zero, PNP_DEVICE_ACTIVE) + PNP_DEVICE_ACTIVE = 0 EXIT_CONFIG_MODE () #if defined(SUPERIO_KBC_PS2LDN) Notify (SUPERIO_ID(PS2, SUPERIO_KBC_PS2LDN), 1) @@ -95,7 +95,7 @@ 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 = 1 EXIT_CONFIG_MODE () #if defined(SUPERIO_KBC_PS2LDN) Notify (SUPERIO_ID(PS2, SUPERIO_KBC_PS2LDN), 1) @@ -155,8 +155,8 @@
Method (_STA) { - Store (^^SUPERIO_ID(KBD, SUPERIO_KBC_LDN)._STA (), Local0) - If (LEqual (Local0, DEVICE_PRESENT_ACTIVE)) { + Local0 = ^^SUPERIO_ID(KBD, SUPERIO_KBC_LDN)._STA () + If (Local0 == DEVICE_PRESENT_ACTIVE) { PNP_GENERIC_STA(SUPERIO_KBC_PS2LDN) } Else { Return (Local0) @@ -166,7 +166,7 @@ Method (_DIS) { ENTER_CONFIG_MODE (SUPERIO_KBC_PS2LDN) - Store (Zero, PNP_DEVICE_ACTIVE) + PNP_DEVICE_ACTIVE = 0 EXIT_CONFIG_MODE () }
@@ -200,7 +200,7 @@ }) ENTER_CONFIG_MODE (SUPERIO_KBC_PS2LDN) PNP_WRITE_IRQ(PNP_IRQ0, Arg0, IR1) - Store (One, PNP_DEVICE_ACTIVE) + PNP_DEVICE_ACTIVE = 1 EXIT_CONFIG_MODE () } } diff --git a/src/superio/acpi/pnp_uart.asl b/src/superio/acpi/pnp_uart.asl index f780063..b5b22f7 100644 --- a/src/superio/acpi/pnp_uart.asl +++ b/src/superio/acpi/pnp_uart.asl @@ -112,7 +112,7 @@ 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 = 1 EXIT_CONFIG_MODE () } }