summaryrefslogtreecommitdiff
path: root/src/mainboard/roda
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-10-08 10:06:43 +0200
committerMichael Niewöhner <foss@mniewoehner.de>2021-01-26 20:55:41 +0000
commit53dd00a6b0d9e0779302db621d777e84ea40cba3 (patch)
tree48e373e0b5dbc321e5e7934e85cbf2da7b853dd2 /src/mainboard/roda
parentf3985488ff94158b9fb08c997a838a49d0766ee4 (diff)
mb/roda/rk9: Convert to ASL 2.0 syntax
Generated build/dsdt.dsl are identical. Change-Id: I3cfa9d3a199a33ac8faddf4dbc1eed0df8703835 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46210 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Diffstat (limited to 'src/mainboard/roda')
-rw-r--r--src/mainboard/roda/rk9/acpi/battery.asl50
-rw-r--r--src/mainboard/roda/rk9/acpi/ec.asl36
-rw-r--r--src/mainboard/roda/rk9/acpi/platform.asl4
-rw-r--r--src/mainboard/roda/rk9/acpi/superio.asl192
-rw-r--r--src/mainboard/roda/rk9/acpi/thermal.asl10
5 files changed, 146 insertions, 146 deletions
diff --git a/src/mainboard/roda/rk9/acpi/battery.asl b/src/mainboard/roda/rk9/acpi/battery.asl
index 72475d6000..88e8aca469 100644
--- a/src/mainboard/roda/rk9/acpi/battery.asl
+++ b/src/mainboard/roda/rk9/acpi/battery.asl
@@ -59,9 +59,9 @@ Device (BAT1)
Method(_BIF, 0)
{
If(\_SB.PCI0.LPCB.EC0.ECON) {
- Store (\_SB.PCI0.LPCB.EC0.B1DW, Index(PBIF, 1))
- Store (\_SB.PCI0.LPCB.EC0.B1FW, Index(PBIF, 2))
- Store (\_SB.PCI0.LPCB.EC0.B1DV, Index(PBIF, 4))
+ PBIF [1] = \_SB.PCI0.LPCB.EC0.B1DW
+ PBIF [2] = \_SB.PCI0.LPCB.EC0.B1FW
+ PBIF [4] = \_SB.PCI0.LPCB.EC0.B1DV
}
Return(PBIF)
@@ -71,26 +71,26 @@ Device (BAT1)
Method(_BST, 0)
{
If(\_SB.PCI0.LPCB.EC0.ECON) {
- Store (\_SB.PCI0.LPCB.EC0.B1PW, Local0)
- If (LGreaterEqual (Local0, 0x8000)) {
- Subtract (0x10000, Local0, Local0)
+ Local0 = \_SB.PCI0.LPCB.EC0.B1PW
+ If (Local0 >= 0x8000) {
+ Local0 = 0x10000 - Local0
}
- Store (Local0, Index(PBST, 1))
- Store (\_SB.PCI0.LPCB.EC0.B1PV, Index(PBST, 3))
+ PBST [1] = Local0
+ PBST [3] = \_SB.PCI0.LPCB.EC0.B1PV
- Store (\_SB.PCI0.LPCB.EC0.B1RW, Index(PBST, 2))
+ PBST [2] = \_SB.PCI0.LPCB.EC0.B1RW
If (\_SB.PCI0.LPCB.EC0.ACCH) {
If (\_SB.PCI0.LPCB.EC0.B1CH) {
If (\_SB.PCI0.LPCB.EC0.B1CG) {
- Store (2, Index(PBST, 0))
+ PBST [0] = 2
}
}
} Else {
If (\_SB.PCI0.LPCB.EC0.B1LO) {
- Store (5, Index(PBST, 0))
+ PBST [0] = 5
} Else {
- Store (1, Index(PBST, 0))
+ PBST [0] = 1
}
}
}
@@ -153,9 +153,9 @@ Device (BAT2)
Method(_BIF, 0)
{
If(\_SB.PCI0.LPCB.EC0.ECON) {
- Store (\_SB.PCI0.LPCB.EC0.B2DW, Index(PBIF, 1))
- Store (\_SB.PCI0.LPCB.EC0.B2FW, Index(PBIF, 2))
- Store (\_SB.PCI0.LPCB.EC0.B2DV, Index(PBIF, 4))
+ PBIF [1] = \_SB.PCI0.LPCB.EC0.B2DW
+ PBIF [2] = \_SB.PCI0.LPCB.EC0.B2FW
+ PBIF [4] = \_SB.PCI0.LPCB.EC0.B2DV
}
Return(PBIF)
@@ -165,26 +165,26 @@ Device (BAT2)
Method(_BST, 0)
{
If(\_SB.PCI0.LPCB.EC0.ECON) {
- Store (\_SB.PCI0.LPCB.EC0.B2PW, Local0)
- If (LGreaterEqual (Local0, 0x8000)) {
- Subtract (0x10000, Local0, Local0)
+ Local0 = \_SB.PCI0.LPCB.EC0.B2PW
+ If (Local0 >= 0x8000) {
+ Local0 = 0x10000 - Local0
}
- Store (Local0, Index(PBST, 1))
- Store (\_SB.PCI0.LPCB.EC0.B2PV, Index(PBST, 3))
+ PBST [1] = Local0
+ PBST [3] = \_SB.PCI0.LPCB.EC0.B2PV
- Store (\_SB.PCI0.LPCB.EC0.B2RW, Index(PBST, 2))
+ PBST [2] = \_SB.PCI0.LPCB.EC0.B2RW
If (\_SB.PCI0.LPCB.EC0.ACCH) {
If (\_SB.PCI0.LPCB.EC0.B2CH) {
If (\_SB.PCI0.LPCB.EC0.B2CG) {
- Store (2, Index(PBST, 0))
+ PBST [0] = 2
}
}
} Else {
If (\_SB.PCI0.LPCB.EC0.B2LO) {
- Store (5, Index(PBST, 0))
+ PBST [0] = 5
} Else {
- Store (1, Index(PBST, 0))
+ PBST [0] = 1
}
}
}
@@ -199,7 +199,7 @@ Device (ADP1)
Name (_HID, "ACPI0003")
Method (_PSR, 0)
{
- Store (\_SB.PCI0.LPCB.EC0.ACCH, PWRS)
+ PWRS = \_SB.PCI0.LPCB.EC0.ACCH
Stall (0x02)
Return (PWRS)
}
diff --git a/src/mainboard/roda/rk9/acpi/ec.asl b/src/mainboard/roda/rk9/acpi/ec.asl
index 7284ccd162..720f92f974 100644
--- a/src/mainboard/roda/rk9/acpi/ec.asl
+++ b/src/mainboard/roda/rk9/acpi/ec.asl
@@ -70,8 +70,8 @@ Device(EC0)
// This method is needed by Windows XP/2000 for
// EC initialization before a driver is loaded
- If (LEqual(Arg0, 0x03)) {
- Store (Arg1, ECON)
+ If (Arg0 == 0x03) {
+ ECON = Arg1
}
}
@@ -79,98 +79,98 @@ Device(EC0)
Method (_Q11, 0)
{
- Store("_Q11: Fn-F8 (Sleep Button) pressed", Debug)
+ Debug = "_Q11: Fn-F8 (Sleep Button) pressed"
Notify(SLPB, 0x80)
}
Method (_Q30, 0)
{
- Store("_Q30: AC In", Debug)
+ Debug = "_Q30: AC In"
Notify(ADP1, 0x80) // Tell the Power Adapter
PNOT() // and the CPU and Battery
}
Method (_Q31, 0)
{
- Store("_Q31: AC Out", Debug)
+ Debug = "_Q31: AC Out"
Notify(ADP1, 0x80) // Tell the Power Adapter
PNOT() // and the CPU and Battery
}
Method (_Q32, 0)
{
- Store("_Q32: Bat1 In", Debug)
+ Debug = "_Q32: Bat1 In"
Notify(BAT1, 0x81)
}
Method (_Q33, 0)
{
- Store("_Q33: Bat1 Out", Debug)
+ Debug = "_Q33: Bat1 Out"
Notify(BAT1, 0x81)
}
Method (_Q34, 0)
{
- Store("_Q34: Bat2 In", Debug)
+ Debug = "_Q34: Bat2 In"
Notify(BAT2, 0x81)
}
Method (_Q35, 0)
{
- Store("_Q35: Bat2 Out", Debug)
+ Debug = "_Q35: Bat2 Out"
Notify(BAT2, 0x81)
}
Method (_Q36, 0)
{
- Store("_Q36: Bat1 Low Power", Debug)
+ Debug = "_Q36: Bat1 Low Power"
Notify(BAT1, 0x80)
}
Method (_Q37, 0)
{
- Store("_Q37: Bat1 Full Charge", Debug)
+ Debug = "_Q37: Bat1 Full Charge"
Notify(BAT1, 0x80)
}
Method (_Q38, 0)
{
- Store("_Q38: Bat2 Low Power", Debug)
+ Debug = "_Q38: Bat2 Low Power"
Notify(BAT2, 0x80)
}
Method (_Q39, 0)
{
- Store("_Q39: Bat2 Full Charge", Debug)
+ Debug = "_Q39: Bat2 Full Charge"
Notify(BAT2, 0x80)
}
Method (_Q40, 0)
{
- Store("_Q40: LID Open/Close", Debug)
+ Debug = "_Q40: LID Open/Close"
Notify(LID0, 0x80)
}
Method (_Q41, 0)
{
- Store("_Q41: Floppy on Parallel Port: Call the Museum!", Debug)
+ Debug = "_Q41: Floppy on Parallel Port: Call the Museum!"
}
Method (_Q50, 0)
{
- Store("_Q50: Processor is hot", Debug)
+ Debug = "_Q50: Processor is hot"
Notify(\_TZ.THRM, 0x80)
}
Method (_Q51, 0)
{
- Store("_Q51: Processor is boiling", Debug)
+ Debug = "_Q51: Processor is boiling"
Notify(\_TZ.THRM, 0x80)
}
Method (_Q52, 0)
{
- Store("_Q52: Processor is burning", Debug)
+ Debug = "_Q52: Processor is burning"
Notify(\_TZ.THRM, 0x80)
}
diff --git a/src/mainboard/roda/rk9/acpi/platform.asl b/src/mainboard/roda/rk9/acpi/platform.asl
index d003016c08..00ac2735ed 100644
--- a/src/mainboard/roda/rk9/acpi/platform.asl
+++ b/src/mainboard/roda/rk9/acpi/platform.asl
@@ -20,12 +20,12 @@ Method(_WAK,1)
// was inserted while a sleep state was active.
// Are we going to S3?
- If (LEqual(Arg0, 3)) {
+ If (Arg0 == 3) {
// ..
}
// Are we going to S4?
- If (LEqual(Arg0, 4)) {
+ If (Arg0 == 4) {
// ..
}
diff --git a/src/mainboard/roda/rk9/acpi/superio.asl b/src/mainboard/roda/rk9/acpi/superio.asl
index 6f356e9833..d9f6ac0a8a 100644
--- a/src/mainboard/roda/rk9/acpi/superio.asl
+++ b/src/mainboard/roda/rk9/acpi/superio.asl
@@ -19,13 +19,13 @@ Device (SIO1)
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 @@ Device (SIO1)
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 @@ Device (SIO1)
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 @@ Device (SIO1)
{
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 @@ Device (SIO1)
IRQNoFlags(_IRA) { 4 }
})
- And (_STA(), 0x02, Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = _STA() & 0x02
+ If (Local0 == 0) {
Return(NONE)
}
@@ -119,15 +119,15 @@ Device (SIO1)
\_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 @@ Device (SIO1)
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 @@ Device (SIO1)
/* 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 @@ Device (SIO1)
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 @@ Device (SIO1)
{
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 @@ Device (SIO1)
IRQNoFlags(_IRB) { 3 }
})
- And (_STA(), 0x02, Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = _STA() & 0x02
+ If (Local0 == 0) {
Return(NONE)
}
@@ -273,14 +273,14 @@ Device (SIO1)
\_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 @@ Device (SIO1)
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)
}
}
diff --git a/src/mainboard/roda/rk9/acpi/thermal.asl b/src/mainboard/roda/rk9/acpi/thermal.asl
index c9bc4d587a..907edc1adf 100644
--- a/src/mainboard/roda/rk9/acpi/thermal.asl
+++ b/src/mainboard/roda/rk9/acpi/thermal.asl
@@ -43,18 +43,18 @@ Scope (\_TZ)
Method (_TMP, 0, Serialized)
{
If (\_SB.PCI0.LPCB.EC0.ALRC) {
- Store(0, \_SB.PCI0.LPCB.EC0.ALRC)
+ \_SB.PCI0.LPCB.EC0.ALRC = 0
Return(_AC0())
}
If (\_SB.PCI0.LPCB.EC0.ALRL) {
- Store(0, THRO)
- Store(0, \_SB.PCI0.LPCB.EC0.ALRL)
+ THRO = 0
+ \_SB.PCI0.LPCB.EC0.ALRL = 0
}
If (\_SB.PCI0.LPCB.EC0.ALRH) {
- Store(1, THRO)
- Store(0, \_SB.PCI0.LPCB.EC0.ALRH)
+ THRO = 1
+ \_SB.PCI0.LPCB.EC0.ALRH = 0
}
/* vendor BIOS reports 0K if TCPU >= 128 deg C ?!? */