HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46026 )
Change subject: mb/*/*/acpi: Convert superio.asl to ASL 2.0 syntax ......................................................................
mb/*/*/acpi: Convert superio.asl to ASL 2.0 syntax
Change-Id: I836b65bbfa281f95a7b15136116ce3bd62f01b82 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/mainboard/aopen/dxplplusu/acpi/superio.asl M src/mainboard/biostar/am1ml/acpi/superio.asl M src/mainboard/roda/rk9/acpi/superio.asl 3 files changed, 158 insertions(+), 158 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/46026/1
diff --git a/src/mainboard/aopen/dxplplusu/acpi/superio.asl b/src/mainboard/aopen/dxplplusu/acpi/superio.asl index 9889032..2a72e8f 100644 --- a/src/mainboard/aopen/dxplplusu/acpi/superio.asl +++ b/src/mainboard/aopen/dxplplusu/acpi/superio.asl @@ -58,11 +58,11 @@
Method (ECFG, 0, NotSerialized) { - Store (0x55, INDX) + INDX = 0x55 } Method (XCFG, 0, NotSerialized) { - Store (0xAA, INDX) + INDX = 0xaa }
Method (_CRS, 0, NotSerialized) @@ -72,16 +72,16 @@ CreateByteField (MSBF, _SB.PCI0.ICH0.SMSC._Y1B._LEN, IOML)
ECFG () - Store (0x0A, _SB.PCI0.ICH0.SMSC.LDN) - Store (0x00, IOM1) - Store (0x00, IOM2) - Or (_SB.PCI0.ICH0.SMSC.IOAH, IOM1, IOM1) - ShiftLeft (IOM1, 0x08, IOM1) - Or (_SB.PCI0.ICH0.SMSC.IOAL, IOM1, IOM1) - Store (IOM1, IOM2) - If (LNotEqual (IOM1, 0x00)) + _SB.PCI0.ICH0.SMSC.LDN = 0x0A + IOM1 = 0x00 + IOM2 = 0x00 + IOM1 |= _SB.PCI0.ICH0.SMSC.IOAH + IOM1 <<= 8 + IOM1 |= _SB.PCI0.ICH0.SMSC.IOAL + IOM2 = IOM1 + If (IOM1 != 0x00) { - Store (0x80, IOML) + IOML = 0x80 } XCFG ()
@@ -92,70 +92,70 @@ Method (_INI, 0, NotSerialized) { /* GPIO configuration */ - Store (0x00, GC10) - Store (0x81, GC11) - Store (0x00, GC17) - Store (0x0c, GC21) - Store (0x00, GC22) - Store (0x04, GC27) - Store (0x04, GC30) - Store (0x01, GC31) - Store (0x01, GC32) - Store (0x01, GC33) - Store (0x01, GC34) /* GPI password jumper */ - Store (0x01, GC35) /* GPI scsi enable jumper */ - Store (0x01, GC42) /* GPI */ - Store (0x86, GC60) /* led 1 */ - Store (0x81, GC61) /* led 2 ?? */ + GC10 = 0x00 + GC11 = 0x81 + GC17 = 0x00 + GC21 = 0x0c + GC22 = 0x00 + GC27 = 0x04 + GC30 = 0x04 + GC31 = 0x01 + GC32 = 0x01 + GC33 = 0x01 + GC34 = 0x01 /* GPI password jumper */ + GC35 = 0x01 /* GPI scsi enable jumper */ + GC42 = 0x01 /* GPI */ + GC60 = 0x86 /* led 1 */ + GC61 = 0x81 /* led 2 ?? */
/* GPIO initial output levels */ - Store (GP_1, Local0) - And( Local0, 0x7C, Local0) - Or ( Local0, 0x81, Local0) - Store (Local0, GP_1) + Local0 = GP_1 + Local0 &= 0x7C + Local0 |= 0x81 + GP_1 = Local0
- Store (GP_2, Local0) - And( Local0, 0xFE, Local0) - Or ( Local0, 0x00, Local0) - Store (Local0, GP_2) + Local0 = GP_2 + Local0 &= 0xFE + Local0 |= 0x00 + GP_2 = Local0
- Store (GP_3, Local0) - And( Local0, 0x7F, Local0) - Or ( Local0, 0x80, Local0) - Store (Local0, GP_3) + Local0 = GP_3 + Local0 &= 0x7F + Local0 |= 0x80 + GP_3 = Local0
- Store (GP_4, Local0) - And( Local0, 0x7F, Local0) - Or ( Local0, 0x00, Local0) - Store (Local0, GP_4) + Local0 = GP_4 + Local0 &= 0x7F + Local0 |= 0x00 + GP_4 = Local0
/* Power Led */ - Store (LED1, Local0) - And( Local0, 0xfc, Local0) - Or ( Local0, 0x01, Local0) - Store (Local0, LED1) + Local0 = LED1 + Local0 &= 0xfc + Local0 |= 0x01 + LED1 = Local0
}
Method (MLED, 1, NotSerialized) { - If (LEqual (Arg0, 0x00)) + If (Arg0 == 0x00) { - Store (0x00, LED1) + LED1 = 0x00 }
- If (LOr (LEqual (Arg0, 0x01), LEqual (Arg0, 0x02))) + If ((Arg0 == 0x01) || (Arg0 == 0x02)) { - Store (0x01, LED1) + LED1 = 0x01 }
- If (LEqual (Arg0, 0x03)) + If (Arg0 == 0x03) { - Store (0x02, LED1) + LED1 = 0x02 }
- If (LOr (LEqual (Arg0, 0x04), LEqual (Arg0, 0x05))) + If ((Arg0 == 0x04) || (Arg0 == 0x05)) { - Store (0x03, LED1) + LED1 = 0x03 } } diff --git a/src/mainboard/biostar/am1ml/acpi/superio.asl b/src/mainboard/biostar/am1ml/acpi/superio.asl index a4eda2b..03683b3 100644 --- a/src/mainboard/biostar/am1ml/acpi/superio.asl +++ b/src/mainboard/biostar/am1ml/acpi/superio.asl @@ -12,8 +12,8 @@ IRQNoFlags () {12} }) Method (_STA, 0, NotSerialized) { - And (FLG0, 0x04, Local0) - If (LEqual (Local0, 0x04)) { + Local0 = FLG0 & 0x04 + If (Local0 == 0x04) { Return (0x0F) } Else { Return (0x00) @@ -24,8 +24,8 @@ Device (PS2K) { Name (_HID, EisaId ("PNP0303")) Method (_STA, 0, NotSerialized) { - And (FLG0, 0x04, Local0) - If (LEqual (Local0, 0x04)) { + Local0 = FLG0 & 0x04 + If (Local0 == 0x04) { Return (0x0F) } Else { Return (0x00) @@ -42,8 +42,8 @@ Name (_HID, EISAID ("PNP0501")) Name (_UID, 1) Method (_STA, 0, NotSerialized) { - And (FLG0, 0x04, Local0) - If (LEqual (Local0, 0x04)) { + Local0 = FLG0 & 0x04 + If (Local0 == 0x04) { Return (0x0F) } Else { Return (0x00) @@ -65,8 +65,8 @@ Name (_HID, EISAID ("PNP0400")) Name (_UID, 1) Method (_STA, 0, NotSerialized) { - And (FLG0, 0x04, Local0) - If (LEqual (Local0, 0x04)) { + Local0 = FLG0 & 0x04 + If (Local0 == 0x04) { Return (0x0F) } Else { Return (0x00) diff --git a/src/mainboard/roda/rk9/acpi/superio.asl b/src/mainboard/roda/rk9/acpi/superio.asl index 6f356e9..efca0a1e 100644 --- a/src/mainboard/roda/rk9/acpi/superio.asl +++ b/src/mainboard/roda/rk9/acpi/superio.asl @@ -19,13 +19,13 @@ Method (READ, 3) { Acquire (SIOM, 0xffff) - If (LEqual(Arg0, 0)) { - Store (0x55, INDX) - Store (Arg1, INDX) - Store (DATA, Local1) - Store (0xaa, INDX) + If (Arg0 == 0) { + INDX = 0x55 + INDX = Arg1 + Local1 = DATA + INDX = 0xaa } - And (Local1, Arg2, Local1) + Local1 &= Arg2 Release(SIOM) Return(Local1) } @@ -33,11 +33,11 @@ Method (WRIT, 3) { Acquire (SIOM, 0xffff) - If (LEqual(Arg0, 0)) { - Store (0x55, INDX) - Store (Arg1, INDX) - Store (Arg2, DATA) - Store (0xaa, INDX) + If (Arg0 == 0) { + INDX = 0x55 + INDX = Arg1 + DATA = Arg2 + INDX = 0xaa } Release(SIOM) } @@ -52,18 +52,18 @@ Method (_STA, 0) { // Device disabled by coreboot? - If (LEqual(CMAP, 0)) { + If (CMAP == 0) { Return (0) }
// Is the hardware enabled? - Store (READ(0, 0x24, 0xff), Local0) - If (LEqual(Local0, 0)) { + Local0 = READ (0, 0x24, 0xff) + If (Local0 == 0) { Return (0xd) } Else { // Power Enabled? - Store (READ(0, 0x02, 0x08), Local0) - If (LEqual(Local0, 0)) { + Local0 = READ (0, 0x02, 0x08) + If (Local0 == 0) { Return (0x0d) } Else { Return (0x0f) @@ -76,12 +76,12 @@ { WRIT(0, 0x24, 0x00)
- Store(READ(0, 0x28, 0x0f), Local0) + Local0 = READ (0, 0x28, 0x0f) WRIT(0, 0x28, Local0)
- Store(READ(0, 0x02, 0xff), Local0) - Not(0x08, Local1) - And(Local0, Local1, Local0) + Local0 = READ(0, 0x02, 0xff) + Local1 = 0x08 + Local0 &= Local1 WRIT(0, 0x02, Local0) }
@@ -106,8 +106,8 @@ IRQNoFlags(_IRA) { 4 } })
- And (_STA(), 0x02, Local0) - If (LEqual(Local0, 0)) { + Local0 = _STA() & 0x02 + If (Local0 == 0) { Return(NONE) }
@@ -119,15 +119,15 @@ _SB.PCI0.LPCB.SIO1.COMA._CRS._IRA._INT, IRQ)
/* I/O Base */ - Store (READ(0, 0x24, 0xfe), Local0) - ShiftLeft(Local0, 0x02, Local0) - Store(Local0, IOMN) - Store(Local0, IOMX) + Local0 = READ (0, 0x24, 0xfe) + Local0 <<= 2 + IOMN = Local0 + IOMX = Local0
/* Interrupt */ - Store(READ(0, 0x28, 0xf0), Local0) - ShiftRight(Local0, 4, Local0) - ShiftLeft(1, Local0, IRQ) + Local0 = READ (0, 0x28, 0xf0) + Local0 >>= 4 + IRQ = 1 << Local0 Return(RSRC) }
@@ -140,29 +140,29 @@
WRIT(0, 0x24, 0) FindSetRightBit(IRQL, Local0) - Decrement(Local0) - ShiftLeft(Local0, 4, Local0) + Local0-- + Local0 <<= 4
- Store(READ(0, 0x28, 0x0f), Local1) - Or(Local0, Local1, Local0) + Local1 = READ (0, 0x28, 0x0f) + Local0 |= Local1 WRIT(0, 0x28, Local0)
- Store(IOLO, Local0) - ShiftRight(Local0, 2, Local0) - And(Local0, 0xfe, Local0) + Local0 = IOLO + Local0 >>= 2 + Local0 &= 0xfe
- Store(IOHI, Local1) - ShiftLeft(Local1, 6, Local1) - Or (Local0, Local1, Local0) + Local1 = IOHI + Local1 <<= 6 + Local0 |= Local1 WRIT(0, 0x24, Local0)
- Store(READ(0, 0x02, 0xff), Local0) - Or(Local0, 0x08, Local0) + Local0 = READ(0, 0x02, 0xff) + Local0 |= 0x08 WRIT(0, 0x02, Local0)
- Store(READ(0, 0x07, 0xff), Local0) - Not(0x40, Local1) - And (Local0, Local1, Local0) + Local0 = READ (0, 0x07, 0xff) + Local1 = ~0x40 + Local0 &= Local1 WRIT(0, 0x07, Local0) }
@@ -170,22 +170,22 @@ /* D0 state - Line drivers are on */ Method (_PS0, 0) { - Store(READ(0, 0x02, 0xff), Local0) - Or(Local0, 0x08, Local0) + Local0 = READ(0, 0x02, 0xff) + Local0 |= 0x08 WRIT(0, 0x02, Local0)
- Store (READ(0, 0x07, 0xff), Local0) - Not(0x40, Local1) - And(Local0, Local1, Local0) + Local0 = READ (0, 0x07, 0xff) + Local1 = ~0x40 + Local0 &= Local1 WRIT(0, 0x07, Local0) }
/* D3 State - Line drivers are off */ Method(_PS3, 0) { - Store(READ(0, 0x02, 0xff), Local0) - Not(0x08, Local1) - And(Local0, Local1, Local0) + Local0 = READ(0, 0x02, 0xff) + Local1 = 0x08 + Local0 &= Local1 WRIT(0, 0x02, Local0) } } @@ -200,24 +200,24 @@ Method (_STA, 0) { // Device disabled by coreboot? - If (LEqual(CMBP, 0)) { + If (CMBP == 0) { Return (0) }
/* IRDA? */ - Store(READ(0, 0x0c, 0x38), Local0) - If (LNotEqual(Local0, Zero)) { + Local0 = READ (0, 0x0c, 0x38) + If (Local0 != 0) { Return (0) }
// Is the hardware enabled? - Store (READ(0, 0x25, 0xff), Local0) - If (LEqual(Local0, 0)) { + Local0 = READ (0, 0x25, 0xff) + If (Local0 == 0) { Return (0xd) } Else { // Power Enabled? - Store (READ(0, 0x02, 0x80), Local0) - If (LEqual(Local0, 0)) { + Local0 = READ (0, 0x02, 0x80) + If (Local0 == 0) { Return (0x0d) } Else { Return (0x0f) @@ -230,12 +230,12 @@ { WRIT(0, 0x25, 0x00)
- Store(READ(0, 0x28, 0xf0), Local0) + Local0 = READ (0, 0x28, 0xf0) WRIT(0, 0x28, Local0)
- Store(READ(0, 0x02, 0xff), Local0) - Not(0x80, Local1) - And(Local0, Local1, Local0) + Local0 = READ(0, 0x02, 0xff) + Local1 = ~0x80 + Local0 &= Local1 WRIT(0, 0x02, Local0) }
@@ -260,8 +260,8 @@ IRQNoFlags(_IRB) { 3 } })
- And (_STA(), 0x02, Local0) - If (LEqual(Local0, 0)) { + Local0 = _STA() & 0x02 + If (Local0 == 0) { Return(NONE) }
@@ -273,14 +273,14 @@ _SB.PCI0.LPCB.SIO1.COMB._CRS._IRB._INT, IRQ)
/* I/O Base */ - Store (READ(0, 0x25, 0xfe), Local0) - ShiftLeft(Local0, 0x02, Local0) - Store(Local0, IOMN) - Store(Local0, IOMX) + Local0 = READ (0, 0x25, 0xfe) + Local0 <<= 2 + IOMN = Local0 + IOMX = Local0
/* Interrupt */ - Store(READ(0, 0x28, 0x0f), Local0) - ShiftLeft(1, Local0, IRQ) + Local0 = READ (0, 0x28, 0x0f) + IRQ = 1 << Local0 Return(RSRC) }
@@ -293,55 +293,55 @@
WRIT(0, 0x25, 0) FindSetRightBit(IRQL, Local0) - Decrement(Local0) + Local0--
- Store(READ(0, 0x28, 0xf0), Local1) - Or(Local0, Local1, Local0) + Local1 = READ (0, 0x28, 0xf0) + Local0 |= Local1 WRIT(0, 0x28, Local0)
- Store(IOLO, Local0) - ShiftRight(Local0, 2, Local0) - And(Local0, 0xfe, Local0) + Local0 = IOLO + Local0 >>= 2 + Local0 &= 0xfe
- Store(IOHI, Local1) - ShiftLeft(Local1, 6, Local1) - Or (Local0, Local1, Local0) + Local1 = IOHI + Local1 <<= 6 + Local0 |= Local1 WRIT(0, 0x25, Local0)
- Store(READ(0, 0x0c, 0xff), Local0) - Not(0x38, Local1) - And(Local0, Local1, Local0) + Local0 = READ (0, 0x0c, 0xff) + Local1 = ~0x38 + Local0 &= Local1 WRIT(0, 0x0c, Local0)
- Store(READ(0, 0x02, 0xff), Local0) - Or(Local0, 0x80, Local0) + Local0 = READ(0, 0x02, 0xff) + Local0 |= 0x80 WRIT(0, 0x02, Local0)
- Store(READ(0, 0x07, 0xff), Local0) - Not(0x20, Local1) - And (Local0, Local1, Local0) + Local0 = READ (0, 0x07, 0xff) + Local1 = ~0x20 + Local0 &= Local1 WRIT(0, 0x07, Local0) }
/* D0 state - Line drivers are on */ Method (_PS0, 0) { - Store(READ(0, 0x02, 0xff), Local0) - Or(Local0, 0x80, Local0) + Local0 = READ(0, 0x02, 0xff) + Local0 |= 0x80 WRIT(0, 0x02, Local0)
- Store (READ(0, 0x07, 0xff), Local0) - Not(0x20, Local1) - And(Local0, Local1, Local0) + Local0 = READ (0, 0x07, 0xff) + Local1 = ~0x20 + Local0 &= Local1 WRIT(0, 0x07, Local0) }
/* D3 State - Line drivers are off */ Method(_PS3, 0) { - Store(READ(0, 0x02, 0xff), Local0) - Not(0x80, Local1) - And(Local0, Local1, Local0) + Local0 = READ(0, 0x02, 0xff) + Local1 = ~0x80 + Local0 &= Local1 WRIT(0, 0x02, Local0) } }