{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>
This commit is contained in:
Felix Singer 2022-12-26 08:17:06 +01:00
parent b4767ce169
commit ca4b587f95
37 changed files with 154 additions and 154 deletions

View File

@ -33,7 +33,7 @@ Device (BATX)
Name (BTNM, Zero) // Battery number
// Workaround for full battery status, enabled by default
Name (BFWK, One)
Name (BFWK, 1)
// Method to enable full battery workaround
Method (BFWE)

View File

@ -7,7 +7,7 @@ Mutex (BATM, 0)
// Wait for desired battery index to be presented in shared memory
// Arg0 = battery index
// Returns Zero on success, One on error.
// Returns Zero on success, 1 on error.
Method (BTSW, 1)
{
#ifdef EC_ENABLE_SECOND_BATTERY_DEVICE
@ -15,7 +15,7 @@ Method (BTSW, 1)
Return (Zero)
}
If (Arg0 >= BTCN) {
Return (One)
Return (1)
}
\_SB.PCI0.LPCB.EC0.BTID = Arg0
Local0 = 5 // Timeout 5 msec
@ -25,12 +25,12 @@ Method (BTSW, 1)
Local0--
If (Local0 == 0)
{
Return (One)
Return (1)
}
}
#else
If (Arg0 != 0) {
Return (One)
Return (1)
}
#endif
Return (Zero)
@ -285,7 +285,7 @@ Device (BAT0)
// Method to enable full battery workaround
Method (BFWE)
{
BFWK = One
BFWK = 1
}
// Method to disable full battery workaround
@ -375,7 +375,7 @@ Device (BAT1)
// Method to enable full battery workaround
Method (BFWE)
{
BFWK = One
BFWK = 1
}
// Method to disable full battery workaround

View File

@ -41,7 +41,7 @@ Method (BSTR, 1, Serialized)
W (SSEL, Arg0)
/* Fill buffer until NUL or max string length is read */
Name (IBUF, Buffer (Local0 + One) {})
Name (IBUF, Buffer (Local0 + 1) {})
For (Local1 = Zero, Local1 < Local0, Local1++) {
Local2 = R (BSBS)
If (!Local2) {

View File

@ -36,13 +36,13 @@ Device (EC0)
W (ERDY, Arg1)
/* Indicate that the OS supports S0ix */
W (CSOS, One)
W (CSOS, 1)
/* Tell EC to stop emulating PS/2 mouse */
W (PS2M, Zero)
/* Enable DPTF support if enabled in devicetree */
If (\DPTE == One) {
If (\DPTE == 1) {
W (DWST, Arg1)
}
@ -146,7 +146,7 @@ Device (EC0)
If (Arg0) {
Printf ("EC Enter S0ix")
W (CSEX, One)
W (CSEX, 1)
/*
* Read back from EC RAM after enabling S0ix
@ -158,7 +158,7 @@ Device (EC0)
W (CSEX, Zero)
/* If UCSI event happened during S0ix send it now. */
If (^UCEP == One) {
If (^UCEP == 1) {
^_Q79 ()
}
}

View File

@ -145,6 +145,6 @@ Method (_Q79, 0, Serialized)
^UCEP = Zero
} Else {
Printf ("EC _Q79 UCSI Event Masked in S0ix")
^UCEP = One
^UCEP = 1
}
}

View File

@ -13,13 +13,13 @@ Method (GPVX, 0, Serialized)
Return (Zero)
}
Return (One)
Return (1)
}
/* Enable Privacy Screen */
Method (EPVX, 0, Serialized)
{
W (EPCT, One)
W (EPCT, 1)
}
/* Disable Privacy Screen */

View File

@ -5,7 +5,7 @@ Device (UCSI)
Name (_HID, "GOOG000E")
Name (_CID, EisaId ("PNP0CA0"))
Name (_DDN, "Wilco EC UCSI")
Name (_UID, One)
Name (_UID, 1)
Name (_STA, 0xb)
/* Value written to EC control register to start UCSI command */
@ -69,16 +69,16 @@ Device (UCSI)
Method (_DSM, 4, Serialized)
{
If (Arg0 != ToUUID ("6f8398c2-7ca4-11e4-ad36-631042b5008f")) {
Return (Buffer (One) { Zero })
Return (Buffer (1) { Zero })
}
Switch (ToInteger (Arg2))
{
Case (Zero)
{
Return (Buffer (One) { 0x07 })
Return (Buffer (1) { 0x07 })
}
Case (One)
Case (1)
{
/* Write Message Out */
W (^^UMO0, ^MGO0)
@ -138,6 +138,6 @@ Device (UCSI)
^CCI3 = R (^^UCI3)
}
}
Return (Buffer (One) { Zero })
Return (Buffer (1) { Zero })
}
}

View File

@ -30,7 +30,7 @@ Name (VLAP, 0xcd) /* Laptop Mode */
Device (VBTN)
{
Name (_HID, "INT33D6")
Name (_UID, One)
Name (_UID, 1)
Name (_DDN, "Intel Virtual Button Driver")
/*
@ -70,7 +70,7 @@ Device (VBTO)
{
Name (_HID, "INT33D3")
Name (_CID, "PNP0C60")
Name (_UID, One)
Name (_UID, 1)
Name (_DDN, "Laptop/tablet mode indicator driver")
Method (_STA, 0)

View File

@ -69,7 +69,7 @@ Device(EC)
if (^HKEY.INIT == 0) {
^HKEY.WBDC = BTEB
^HKEY.WWAN = WWEB
^HKEY.INIT = One
^HKEY.INIT = 1
}
}
}
@ -318,11 +318,11 @@ Device(EC)
Method (FANE, 1, Serialized)
{
If (Arg0) {
FAND = One
FAND = 1
FANA = Zero
} Else {
FAND = Zero
FANA = One
FANA = 1
}
}

View File

@ -112,8 +112,8 @@ External (\PPKG, MethodObj)
* in another ACPI scope. Call a method that does it!
*/
Method (_ON) {
\_SB.PCI0.LPCB.EC.FANE(One)
\FLVL = One
\_SB.PCI0.LPCB.EC.FANE(1)
\FLVL = 1
Notify (\_TZ.THM0, NOTIFY_TZ_TRIPPTCHG)
}

View File

@ -51,7 +51,7 @@ Device (HKEY)
/* Report event */
Method (RHK, 1, NotSerialized) {
Local0 = One << (Arg0 - 1)
Local0 = 1 << (Arg0 - 1)
If (EMSK & Local0) {
BTN = Arg0
Notify (HKEY, 0x80)
@ -60,7 +60,7 @@ Device (HKEY)
/* Report tablet */
Method (RTAB, 1, NotSerialized) {
Local0 = One << (Arg0 - 1)
Local0 = 1 << (Arg0 - 1)
If (ETAB & Local0) {
BTAB = Arg0
Notify (HKEY, 0x80)
@ -84,7 +84,7 @@ Device (HKEY)
/* Enable/disable event. */
Method (MHKM, 2, NotSerialized) {
If (Arg0 <= 0x20) {
Local0 = One << (Arg0 - 1)
Local0 = 1 << (Arg0 - 1)
If (Arg1)
{
DHKN |= Local0
@ -159,10 +159,10 @@ Device (HKEY)
*/
Method (GBDC, 0)
{
HAST = One
HAST = 1
If (HBDC) {
Local0 = One
Local0 = 1
If(\_SB.PCI0.LPCB.EC.BTEB)
{
Local0 |= 2
@ -181,7 +181,7 @@ Device (HKEY)
*/
Method (SBDC, 1)
{
HAST = One
HAST = 1
If (HBDC) {
Local0 = (Arg0 & 2) >> 1
@ -201,10 +201,10 @@ Device (HKEY)
*/
Method (GWAN, 0)
{
HAST = One
HAST = 1
If (HWAN) {
Local0 = One
Local0 = 1
If(\_SB.PCI0.LPCB.EC.WWEB)
{
Local0 |= 2
@ -223,7 +223,7 @@ Device (HKEY)
*/
Method (SWAN, 1)
{
HAST = One
HAST = 1
If (HWAN) {
Local0 = (Arg0 & 2) >> 1
@ -270,7 +270,7 @@ Device (HKEY)
Method (GUWB, 0)
{
If (HUWB) {
Local0 = One
Local0 = 1
If(\_SB.PCI0.LPCB.EC.UWBE)
{
Local0 |= 2

View File

@ -8,7 +8,7 @@ Device (AC)
_SB
})
Name (ACFG, One)
Name (ACFG, 1)
Method (_PSR, 0, NotSerialized) // _PSR: Power Source
{

View File

@ -32,10 +32,10 @@ Device (BAT0)
Name (PBIF, Package (0x0D)
{
One, // 0 - Power Unit
1, // 0 - Power Unit
0xFFFFFFFF, // 1 - Design Capacity
0xFFFFFFFF, // 2 - Last Full Charge Capacity
One, // 3 - Battery Technology
1, // 3 - Battery Technology
BATTERY_DESIGN_VOLTAGE_MV, // 4 - Design Voltage
Zero, // 5 - Design Capacity of Warning
Zero, // 6 - Design Capacity of Low
@ -129,7 +129,7 @@ Device (BAT0)
}
Else
{
Local0 |= One
Local0 |= 1
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
}

View File

@ -35,7 +35,7 @@ Device (\_SB.PCI0.LPCB.EC0)
Method (_REG, 2, Serialized) // _REG: Region Availability
{
Printf ("EC: _REG %o %o", ToHexString(Arg0), ToHexString(Arg1))
If ((Arg0 == 0x03) && (Arg1 == One)) {
If ((Arg0 == 0x03) && (Arg1 == 1)) {
// Enable hardware touchpad lock, airplane mode, and keyboard backlight keys
ECOS = 1

View File

@ -25,7 +25,7 @@ Device (HIDD)
Method (HPEM, 1, Serialized)
{
HBSY = One
HBSY = 1
HIDX = Arg0
Notify (HIDD, 0xC0)
@ -36,11 +36,11 @@ Device (HIDD)
Local0++
}
If (HBSY == One)
If (HBSY == 1)
{
HBSY = Zero
HIDX = Zero
Return (One)
Return (1)
}
Else
{

View File

@ -110,7 +110,7 @@ Device (LIEC) {
Method (GKBL, 0, Serialized) {
Local0 = 0
If (^^PCI0.LPCB.EC0.ECOK) {
^^PCI0.LPCB.EC0.FDAT = One
^^PCI0.LPCB.EC0.FDAT = 1
^^PCI0.LPCB.EC0.FCMD = 0xCA
Local0 = ^^PCI0.LPCB.EC0.FBUF
^^PCI0.LPCB.EC0.FCMD = Zero

View File

@ -10,7 +10,7 @@ Device (LID0)
If (^^PCI0.LPCB.EC0.ECOK) {
Return (^^PCI0.LPCB.EC0.LSTE)
} Else {
Return (One)
Return (1)
}
}

View File

@ -60,7 +60,7 @@ Device (BAT)
Name (DLOW, 10)
/* Workaround for full battery status, enabled by default */
Name (BFWK, One)
Name (BFWK, 1)
/* Method to enable full battery workaround */
Method (BFWE)

View File

@ -205,7 +205,7 @@ Device (EC0)
Method (_Q10, 0, NotSerialized)
{
Printf ("AC Insertion Event 0x10")
\PWRS = One
\PWRS = 1
Notify (AC, 0x80)
Notify (BATX, 0x80)
\PNOT ()

View File

@ -44,12 +44,12 @@ Device (BATX)
})
// Workaround for full battery status, enabled by default
Name (BFWK, One)
Name (BFWK, 1)
// Method to enable full battery workaround
Method (BFWE)
{
BFWK = One
BFWK = 1
}
// Method to disable full battery workaround
@ -97,7 +97,7 @@ Device (BATX)
//
// Information ID 1 -
//
HIID = One
HIID = 1
WAEC ()
//
@ -106,7 +106,7 @@ Device (BATX)
// ACPI spec : 0 - mWh : 1 - mAh
//
Local7 = SBCM
PBIF[0] = Local7 ^ One
PBIF[0] = Local7 ^ 1
//
// Information ID 0 -
@ -224,7 +224,7 @@ Device (BATX)
{
if (HB0S & 0x40)
{
Local0 = One
Local0 = 1
}
Else
{
@ -249,7 +249,7 @@ Device (BATX)
Else
{
// Always discharging when on battery power
Local1 = One
Local1 = 1
}
// Flag if the battery level is critical
@ -282,7 +282,7 @@ Device (BATX)
}
}
Local6 = DerefOf (PBIF[0]) ^ One
Local6 = DerefOf (PBIF[0]) ^ 1
If (Local6)
{

View File

@ -550,7 +550,7 @@ Device (EC0)
\LIDS = ~HPLD
// Enable OS control of fan speed
// TODO FCOS = One
// TODO FCOS = 1
// Force a read of CPU temperature
// TODO Which temperature corresponds to the CPU?
@ -593,7 +593,7 @@ Device (EC0)
// AC Power Connected
Method (_Q26, 0, NotSerialized)
{
\PWRS = One
\PWRS = 1
Notify (AC, 0x80)
Notify (BATX, 0x80)
\PNOT ()
@ -610,7 +610,7 @@ Device (EC0)
// LID Open
Method (_Q2A)
{
\LIDS = One
\LIDS = 1
Notify (\_SB.LID0, 0x80)
}

View File

@ -42,12 +42,12 @@ Device (BAT0)
Name (BSTP, Zero)
// Workaround for full battery status, enabled by default
Name (BFWK, One)
Name (BFWK, 1)
// Method to enable full battery workaround
Method (BFWE)
{
BFWK = One
BFWK = 1
}
// Method to disable full battery workaround

View File

@ -64,7 +64,7 @@ Device (EC0)
\LIDS = LIDS
// Enable OS control of fan speed
FCOS = One
FCOS = 1
// Force a read of CPU temperature
Local0 = CPUT
@ -76,14 +76,14 @@ Device (EC0)
{
Method (_STA) {
If (\FLVL <= 0) {
Return (One)
Return (1)
} Else {
Return (Zero)
}
}
Method (_ON) {
If (FCOS) {
FSL0 = One
FSL0 = 1
\FLVL = 0
Notify (\_TZ.THRM, 0x81)
}
@ -101,14 +101,14 @@ Device (EC0)
{
Method (_STA) {
If (\FLVL <= 1) {
Return (One)
Return (1)
} Else {
Return (Zero)
}
}
Method (_ON) {
If (FCOS) {
FSL1 = One
FSL1 = 1
\FLVL = 1
Notify (\_TZ.THRM, 0x81)
}
@ -126,14 +126,14 @@ Device (EC0)
{
Method (_STA) {
If (\FLVL <= 2) {
Return (One)
Return (1)
} Else {
Return (Zero)
}
}
Method (_ON) {
If (FCOS) {
FSL2 = One
FSL2 = 1
\FLVL = 2
Notify (\_TZ.THRM, 0x81)
}
@ -151,14 +151,14 @@ Device (EC0)
{
Method (_STA) {
If (\FLVL <= 3) {
Return (One)
Return (1)
} Else {
Return (Zero)
}
}
Method (_ON) {
If (FCOS) {
FSL3 = One
FSL3 = 1
\FLVL = 3
Notify (\_TZ.THRM, 0x81)
}
@ -176,14 +176,14 @@ Device (EC0)
{
Method (_STA) {
If (\FLVL <= 4) {
Return (One)
Return (1)
} Else {
Return (Zero)
}
}
Method (_ON) {
If (FCOS) {
FSL4 = One
FSL4 = 1
\FLVL = 4
Notify (\_TZ.THRM, 0x81)
}
@ -235,7 +235,7 @@ Device (EC0)
// AC Power Connected
Method (_Q51, 0, NotSerialized)
{
\PWRS = One
\PWRS = 1
Notify (AC, 0x80)
\PNOT ()
}

View File

@ -76,7 +76,7 @@ Scope (\_SB.PCI0.LPCB)
Method (ECRD, 1, Serialized, 0, IntObj, FieldUnitObj)
{
//
// Check for ECDT support, set ECAV to One if ECDT is supported by OS
// Check for ECDT support, set ECAV to 1 if ECDT is supported by OS
// Only check once at beginning since ECAV might be clear later in certain conditions
//
If (ECTK) {

View File

@ -8,7 +8,7 @@ Device (AC)
_SB
})
Name (ACFG, One)
Name (ACFG, 1)
Method (_PSR, 0, NotSerialized) // _PSR: Power Source
{

View File

@ -30,10 +30,10 @@ Device (BAT0)
Name (PBIF, Package (0x0D)
{
One, // 0 - Power Unit
1, // 0 - Power Unit
0xFFFFFFFF, // 1 - Design Capacity
0xFFFFFFFF, // 2 - Last Full Charge Capacity
One, // 3 - Battery Technology
1, // 3 - Battery Technology
0xFFFFFFFF, // 4 - Design Voltage
Zero, // 5 - Design Capacity of Warning
Zero, // 6 - Design Capacity of Low
@ -205,7 +205,7 @@ Device (BAT0)
}
Else
{
Local0 |= One
Local0 |= 1
Local1 = (^^PCI0.LPCB.EC0.BPR0 & 0xFFFF)
}

View File

@ -35,7 +35,7 @@ Device (\_SB.PCI0.LPCB.EC0)
Method (_REG, 2, Serialized) // _REG: Region Availability
{
Debug = Concatenate("EC: _REG", Concatenate(ToHexString(Arg0), Concatenate(" ", ToHexString(Arg1))))
If ((Arg0 == 0x03) && (Arg1 == One)) {
If ((Arg0 == 0x03) && (Arg1 == 1)) {
// Enable hardware touchpad lock, airplane mode, and keyboard backlight keys
ECOS = 1

View File

@ -25,7 +25,7 @@ Device (HIDD)
Method (HPEM, 1, Serialized)
{
HBSY = One
HBSY = 1
HIDX = Arg0
Notify (HIDD, 0xC0)
@ -36,11 +36,11 @@ Device (HIDD)
Local0++
}
If (HBSY == One)
If (HBSY == 1)
{
HBSY = Zero
HIDX = Zero
Return (One)
Return (1)
}
Else
{

View File

@ -10,7 +10,7 @@ Device (LID0)
If (^^PCI0.LPCB.EC0.ECOK) {
Return (^^PCI0.LPCB.EC0.LSTE)
} Else {
Return (One)
Return (1)
}
}

View File

@ -97,7 +97,7 @@ Device (S76D) {
Method (GKBL, 0, Serialized) {
Local0 = 0
If (^^PCI0.LPCB.EC0.ECOK) {
^^PCI0.LPCB.EC0.FDAT = One
^^PCI0.LPCB.EC0.FDAT = 1
^^PCI0.LPCB.EC0.FCMD = 0xCA
Local0 = ^^PCI0.LPCB.EC0.FBUF
^^PCI0.LPCB.EC0.FCMD = Zero

View File

@ -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)\

View File

@ -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 ()
}

View File

@ -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 ()
}
}

View File

@ -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 ()
}
}

View File

@ -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))
{

View File

@ -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 ()

View File

@ -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)