aboutsummaryrefslogtreecommitdiff
path: root/src/superio/smsc/sch5545
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2022-12-26 08:17:06 +0100
committerFelix Singer <felixsinger@posteo.net>2022-12-27 09:03:34 +0000
commitca4b587f95c0f1ed64e187511781abdfd4c7ebfb (patch)
treebc5c5a324c65b107fd6d992167168b0383a63503 /src/superio/smsc/sch5545
parentb4767ce169b202af2a9091275e30881172810fc6 (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/smsc/sch5545')
-rw-r--r--src/superio/smsc/sch5545/acpi/resource_helpers.asl26
-rw-r--r--src/superio/smsc/sch5545/acpi/superio.asl38
2 files changed, 32 insertions, 32 deletions
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 ()