diff options
author | Felix Singer <felixsinger@posteo.net> | 2022-12-26 08:17:06 +0100 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2022-12-27 09:03:34 +0000 |
commit | ca4b587f95c0f1ed64e187511781abdfd4c7ebfb (patch) | |
tree | bc5c5a324c65b107fd6d992167168b0383a63503 /src/superio | |
parent | b4767ce169b202af2a9091275e30881172810fc6 (diff) |
{superio,ec}/acpi: Replace constant "One" with actual number
Change-Id: I5c77b6d1e1dc1134f62dcb3e93df01dc9c2f386c
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71520
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/superio')
-rw-r--r-- | src/superio/acpi/pnp.asl | 4 | ||||
-rw-r--r-- | src/superio/acpi/pnp_generic.asl | 2 | ||||
-rw-r--r-- | src/superio/acpi/pnp_kbc.asl | 4 | ||||
-rw-r--r-- | src/superio/acpi/pnp_uart.asl | 2 | ||||
-rw-r--r-- | src/superio/smsc/sch5545/acpi/resource_helpers.asl | 26 | ||||
-rw-r--r-- | src/superio/smsc/sch5545/acpi/superio.asl | 38 | ||||
-rw-r--r-- | src/superio/winbond/w83627hf/acpi/superio.asl | 64 |
7 files changed, 70 insertions, 70 deletions
diff --git a/src/superio/acpi/pnp.asl b/src/superio/acpi/pnp.asl index 1f63e825da..dbdba5cb53 100644 --- a/src/superio/acpi/pnp.asl +++ b/src/superio/acpi/pnp.asl @@ -108,11 +108,11 @@ #define PNP_READ_IRQ(IRQ_FROM, RESOURCE_TEMPLATE, IRQ_TAG) \ CreateWordField (RESOURCE_TEMPLATE, IRQ_TAG._INT, IRQ_TAG##W)\ - IRQ_TAG##W = One << IRQ_FROM + 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)\ - DMA_TAG##W = One << DMA_FROM + DMA_TAG##W = 1 << DMA_FROM #define PNP_WRITE_IO(IO_TO, RESOURCE, IO_TAG) \ CreateWordField (RESOURCE, IO_TAG._MIN, IO_TAG##I)\ diff --git a/src/superio/acpi/pnp_generic.asl b/src/superio/acpi/pnp_generic.asl index 8ffc507278..a5540e39e8 100644 --- a/src/superio/acpi/pnp_generic.asl +++ b/src/superio/acpi/pnp_generic.asl @@ -168,7 +168,7 @@ Device (SUPERIO_ID(PN, SUPERIO_PNP_LDN)) { #ifdef SUPERIO_PNP_DMA PNP_WRITE_DMA(PNP_DMA0, Arg0, DM0) #endif - PNP_DEVICE_ACTIVE = One + PNP_DEVICE_ACTIVE = 1 EXIT_CONFIG_MODE () } diff --git a/src/superio/acpi/pnp_kbc.asl b/src/superio/acpi/pnp_kbc.asl index 4fd805f8fa..4fd5ab0607 100644 --- a/src/superio/acpi/pnp_kbc.asl +++ b/src/superio/acpi/pnp_kbc.asl @@ -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) - PNP_DEVICE_ACTIVE = One + PNP_DEVICE_ACTIVE = 1 EXIT_CONFIG_MODE () #if defined(SUPERIO_KBC_PS2LDN) Notify (SUPERIO_ID(PS2, SUPERIO_KBC_PS2LDN), 1) @@ -200,7 +200,7 @@ Device (SUPERIO_ID(PS2, SUPERIO_KBC_PS2LDN)) { }) ENTER_CONFIG_MODE (SUPERIO_KBC_PS2LDN) PNP_WRITE_IRQ(PNP_IRQ0, Arg0, IR1) - PNP_DEVICE_ACTIVE = One + PNP_DEVICE_ACTIVE = 1 EXIT_CONFIG_MODE () } } diff --git a/src/superio/acpi/pnp_uart.asl b/src/superio/acpi/pnp_uart.asl index 0b0acc72f0..b5b22f7bb7 100644 --- a/src/superio/acpi/pnp_uart.asl +++ b/src/superio/acpi/pnp_uart.asl @@ -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) - PNP_DEVICE_ACTIVE = One + PNP_DEVICE_ACTIVE = 1 EXIT_CONFIG_MODE () } } diff --git a/src/superio/smsc/sch5545/acpi/resource_helpers.asl b/src/superio/smsc/sch5545/acpi/resource_helpers.asl index 818f470534..c3557f8d29 100644 --- a/src/superio/smsc/sch5545/acpi/resource_helpers.asl +++ b/src/superio/smsc/sch5545/acpi/resource_helpers.asl @@ -12,11 +12,11 @@ Name (DCAT, Package (0x10) { 0xFF, 0xFF, 0xFF, - One, /* KBC */ + 1, /* KBC */ 0xFF, 0xFF, 0xFF, - One, /* KBC */ + 1, /* KBC */ 0xFF }) @@ -44,7 +44,7 @@ Method (DSTA, 1, NotSerialized) Return (Zero) } - Local0 &= One + Local0 &= 1 If (Arg0 < 0x10) { IOST |= (Local0 << Arg0) @@ -54,7 +54,7 @@ Method (DSTA, 1, NotSerialized) { Return (DEVICE_PRESENT_ACTIVE) } - ElseIf ((One << Arg0) & IOST) + ElseIf ((1 << Arg0) & IOST) { Return (DEVICE_PRESENT_INACTIVE) } @@ -169,7 +169,7 @@ Method (GIRQ, 1, NotSerialized) Local1 = PNP_DATA_REG If (CGLD (Arg0) == Local1) { - Local1 = One + Local1 = 1 Local0 = (Local1 << Local0) Return (Local0) } @@ -187,13 +187,13 @@ Method (GDMA, 1, NotSerialized) Local0 = 0x03 /* Only DMA Channels 0-3 */ While (Local0) { - Local1 = (Local0 << One) + Local1 = (Local0 << 1) Local1 += 0x51 /* DMA regs begin at offset 0x50 */ PNP_ADDR_REG = Local1 Local1 = PNP_DATA_REG If ((0x80 | CGLD (Arg0)) == Local1) { - Local1 = One + Local1 = 1 Local0 = (Local1 << Local0) Return (Local0) } @@ -212,7 +212,7 @@ Method (STIO, 2, NotSerialized) PNP_ADDR_REG = Arg0 PNP_DATA_REG = Local0 Local0 = (Arg1 >> 0x08) - Local1 = (Arg0 + One) + Local1 = (Arg0 + 1) PNP_ADDR_REG = Local1 PNP_DATA_REG = Local0 } @@ -222,7 +222,7 @@ Method (SIRQ, 2, NotSerialized) { SWITCH_LDN (SUPERIO_LPC_LDN) FindSetRightBit (Arg1, Local0) - Local0 -= One + Local0 -= 1 Local1 = 0x0F While (Local1) { @@ -257,11 +257,11 @@ Method (SDMA, 2, NotSerialized) { SWITCH_LDN (SUPERIO_LPC_LDN) FindSetRightBit (Arg1, Local0) - Local0 -= One + Local0 -= 1 Local1 = 0x03 While (Local1) { - Local2 = (Local1 << One) + Local2 = (Local1 << 1) Local3 = (0x51 + Local2) PNP_ADDR_REG = Local3 Local4 = PNP_DATA_REG @@ -282,7 +282,7 @@ Method (SDMA, 2, NotSerialized) Local1-- } - Local0 <<= One + Local0 <<= 1 Local0 += 0x51 PNP_ADDR_REG = Local0 PNP_DATA_REG = (0x80 | CGLD (Arg0)) @@ -393,7 +393,7 @@ Method (DCRS, 2, NotSerialized) LEN2 = 0x06 IO31 = (IO21 + 0x07) IO32 = IO31 /* \_SB_.PCI0.LPCB.SIO1.IO31 */ - LEN3 = One + LEN3 = 1 IRQE = GIRQ (Arg0) If ((GDMA (Arg0) > 0x03) || (Arg1 == Zero)) { diff --git a/src/superio/smsc/sch5545/acpi/superio.asl b/src/superio/smsc/sch5545/acpi/superio.asl index 20278b4745..8fb9da2824 100644 --- a/src/superio/smsc/sch5545/acpi/superio.asl +++ b/src/superio/smsc/sch5545/acpi/superio.asl @@ -54,8 +54,8 @@ Device(SIO1) { Name (IO2B, SCH5545_RUNTIME_BASE) #endif Name (IOST, 0x0001) /* IO decoding status */ - Name (MSFG, One) /* Mouse wake config */ - Name (KBFG, One) /* Keyboard wake config */ + Name (MSFG, 1) /* Mouse wake config */ + Name (KBFG, 1) /* Keyboard wake config */ Name (PMFG, Zero) /* Wake config */ /* SuperIO configuration ports */ @@ -268,7 +268,7 @@ Device(SIO1) { KP64, 8 } - OperationRegion (KB64, SystemIO, 0x64, One) + OperationRegion (KB64, SystemIO, 0x64, 1) Field (KB64, ByteAcc, NoLock, Preserve) { , 1, @@ -279,16 +279,16 @@ Device(SIO1) { /* SIO prepare to sleep */ Method (SIOS, 1, NotSerialized) { - If ((Arg0 == 0x03) | (Arg0 == One)) + If ((Arg0 == 0x03) | (Arg0 == 1)) { - ENTER_CONFIG_MODE (One) + ENTER_CONFIG_MODE (1) Local0 = OPT0 OPT0 = (Local0 | 0x60) EXIT_CONFIG_MODE () Local0 = PMS1 PMS1 = (Local0 | 0x18) Local0 = PMES - PMES = (Local0 | One) + PMES = (Local0 | 1) Local0 = PME1 If (KBFG) @@ -311,7 +311,7 @@ Device(SIO1) { } Local0 = PMEN - PMEN = (Local0 | One) + PMEN = (Local0 | 1) While (KRDY) {} KP60 = 0xED @@ -319,7 +319,7 @@ Device(SIO1) { KP60 = Zero While (KRDY) {} KP60 = 0xF4 - Sleep (One) + Sleep (1) } } @@ -332,17 +332,17 @@ Device(SIO1) { Local0 = PMS1 PMS1 = (Local0 & 0x18) Local0 = PMES - PMES = (Local0 & One) + PMES = (Local0 & 1) } /* SIO wake method */ Method (SIOW, 1, NotSerialized) { PMFG = PMS1 - If (Arg0 == One) + If (Arg0 == 1) { GPKM () - ENTER_CONFIG_MODE (One) + ENTER_CONFIG_MODE (1) Local0 = OPT0 OPT0 = (Local0 & 0x9F) EXIT_CONFIG_MODE () @@ -351,10 +351,10 @@ Device(SIO1) { If (Arg0 == 0x03) { GPKM () - ENTER_CONFIG_MODE (One) + ENTER_CONFIG_MODE (1) Local0 = OPT0 OPT0 = (Local0 & 0x9F) - OPT2 |= One + OPT2 |= 1 OPT2 &= 0xFE EXIT_CONFIG_MODE () } @@ -404,7 +404,7 @@ Device(SIO1) { STIO (0x6A, IO11) SIRQ (Zero, IRQM) EXIT_CONFIG_MODE () - DCNT (Zero, One) + DCNT (Zero, 1) } Name (_PRS, ResourceTemplate () @@ -476,17 +476,17 @@ Device(SIO1) { Name (_UID, SUPERIO_UID(SER, SUPERIO_UARTB_LDN)) Method (_STA, 0, NotSerialized) { - Return (DSTA (One)) + Return (DSTA (1)) } Method (_DIS, 0, NotSerialized) { - DCNT (One, Zero) + DCNT (1, Zero) } Method (_CRS, 0, NotSerialized) { - Return (DCRS (One, Zero)) + Return (DCRS (1, Zero)) } Method (_SRS, 1, NotSerialized) @@ -495,9 +495,9 @@ Device(SIO1) { CreateWordField (Arg0, 0x09, IRQM) ENTER_CONFIG_MODE (SUPERIO_LPC_LDN) STIO (0x6E, IO11) - SIRQ (One, IRQM) + SIRQ (1, IRQM) EXIT_CONFIG_MODE () - DCNT (One, One) + DCNT (1, 1) } Name (_PRS, ResourceTemplate () diff --git a/src/superio/winbond/w83627hf/acpi/superio.asl b/src/superio/winbond/w83627hf/acpi/superio.asl index fcf6f8e756..3d85af6c3c 100644 --- a/src/superio/winbond/w83627hf/acpi/superio.asl +++ b/src/superio/winbond/w83627hf/acpi/superio.asl @@ -186,7 +186,7 @@ Device(SIO) { /* PM: Switch to D3 by setting IPD high */ Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - IPD = One + IPD = 1 EXIT_CONFIG_MODE () } @@ -227,7 +227,7 @@ Device(SIO) { /* Disable power saving mode */ Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - FDPW = One + FDPW = 1 EXIT_CONFIG_MODE () } /* Enable power saving mode */ @@ -338,28 +338,28 @@ Device(SIO) { SIFR, 8 } - ACT1 = One + ACT1 = 1 SELE = 0 Sleep(0x64) - If (SIFR) { FD1 = One } + If (SIFR) { FD1 = 1 } ACT1 = Zero - ACT2 = One + ACT2 = 1 SELE = 1 Sleep(0x64) - If (SIFR) { FD2 = One } + If (SIFR) { FD2 = 1 } ACT2 = Zero - ACT3 = One + ACT3 = 1 SELE = 2 Sleep(0x64) - If (SIFR) { FD3 = One } + If (SIFR) { FD3 = 1 } ACT3 = Zero - ACT4 = One + ACT4 = 1 SELE = 3 Sleep(0x64) - If (SIFR) { FD4 = One } + If (SIFR) { FD4 = 1 } ACT4 = Zero SELE = Zero @@ -385,7 +385,7 @@ Device(SIO) { ENTER_CONFIG_MODE (0) IO1L = Local0 IO1H = Local1 - ACTR = One + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -448,7 +448,7 @@ Device(SIO) { } Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - PRPW = One + PRPW = 1 EXIT_CONFIG_MODE () } Method (_PS3) { @@ -503,7 +503,7 @@ Device(SIO) { IOLE = 0x08 } /* Calculate IRQ bitmap */ - Local0 = One + Local0 = 1 IRQW = Local0 << Local5 /* Return resource template */ Return (CRS) @@ -587,7 +587,7 @@ Device(SIO) { /* IRQ */ IRQ0 = FindSetLeftBit (IRQL) - 1 /* Activate */ - ACTR = One + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -626,7 +626,7 @@ Device(SIO) { } Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - UAPW = One + UAPW = 1 EXIT_CONFIG_MODE () } Method (_PS3) { @@ -661,7 +661,7 @@ Device(SIO) { IMAX = Local0 CreateWordField (CRS, IRQX._INT, IRQW) - Local3 = One + Local3 = 1 IRQW = Local3 << Local2 Return (CRS) @@ -710,7 +710,7 @@ Device(SIO) { IO1L = Local0 IO1H = Local1 IRQ0 = Local3 - ACTR = One + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -752,7 +752,7 @@ Device(SIO) { } Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - UBPW = One + UBPW = 1 EXIT_CONFIG_MODE () } Method (_PS3) { @@ -787,7 +787,7 @@ Device(SIO) { IMAX = Local0 CreateWordField (CRS, IRQX._INT, IRQW) - Local3 = One + Local3 = 1 IRQW = Local3 << Local2 Return (CRS) @@ -836,7 +836,7 @@ Device(SIO) { IO1L = Local0 IO1H = Local1 IRQ0 = Local3 - ACTR = One + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -878,7 +878,7 @@ Device(SIO) { } Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - UBPW = One + UBPW = 1 EXIT_CONFIG_MODE () } Method (_PS3) { @@ -913,7 +913,7 @@ Device(SIO) { IMAX = Local0 CreateWordField (CRS, IRQX._INT, IRQW) - Local3 = One + Local3 = 1 IRQW = Local3 << Local2 Return (CRS) @@ -962,7 +962,7 @@ Device(SIO) { IO1L = Local0 IO1H = Local1 IRQ0 = Local3 - ACTR = One + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -1017,7 +1017,7 @@ Device(SIO) { IMAX = Local0 CreateWordField (CRS, IRQX._INT, IRQW) - Local3 = One + Local3 = 1 IRQW = Local3 << Local2 Return (CRS) @@ -1050,7 +1050,7 @@ Device(SIO) { IO1L = Local0 IO1H = Local1 IRQ0 = Local3 - ACTR = One + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -1119,7 +1119,7 @@ Device(SIO) { I1MA = Local2 CreateWordField (CRS, IRQX._INT, IRQW) - Local5 = One + Local5 = 1 IRQW = Local5 << Local4 Return (CRS) @@ -1159,7 +1159,7 @@ Device(SIO) { IO2L = Local2 IO2H = Local3 IRQ0 = Local4 - ACTR = One + ACTR = 1 EXIT_CONFIG_MODE () Notify(PS2M, 1) } @@ -1206,7 +1206,7 @@ Device(SIO) { EXIT_CONFIG_MODE () CreateWordField (CRS, IRQX._INT, IRQW) - Local5 = One + Local5 = 1 IRQW = Local5 << Local4 Return (CRS) @@ -1285,7 +1285,7 @@ Device(SIO) { If (Local2) { CreateWordField (CRS, IRQX._INT, IRQW) - Local3 = One + Local3 = 1 IRQW = Local3 << Local2 } @@ -1340,7 +1340,7 @@ Device(SIO) { If (Local2) { CreateWordField (CRS, IRQX._INT, IRQW) - Local3 = One + Local3 = 1 IRQW = Local3 << Local2 } @@ -1407,7 +1407,7 @@ Device(SIO) { Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - HWPW = One + HWPW = 1 EXIT_CONFIG_MODE () } @@ -1439,7 +1439,7 @@ Device(SIO) { If (Local2) { CreateWordField (CRS, IRQX._INT, IRQW) - Local3 = One + Local3 = 1 IRQW = Local3 << Local2 } Return (CRS) |