diff options
author | Felix Singer <felixsinger@posteo.net> | 2022-12-26 09:38:45 +0100 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2022-12-27 09:06:29 +0000 |
commit | 42efd7f593c9d270ff330d1282d9c569d1ec709a (patch) | |
tree | bccc1e9c9bb2f9aec6c76c55611f0aafdb4f6e9b /src/ec/google | |
parent | fa06bcba06c5842faae797629e9f72ec28d511c0 (diff) |
{superio,ec}/acpi: Replace constant "Zero" with actual number
Change-Id: I449ec5b0bbf3f24d51688efef151d3018d2848b2
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71524
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec/google')
-rw-r--r-- | src/ec/google/chromeec/acpi/battery.asl | 22 | ||||
-rw-r--r-- | src/ec/google/chromeec/acpi/ec.asl | 8 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/battery.asl | 6 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/ec.asl | 18 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/event.asl | 4 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/privacy.asl | 6 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/superio.asl | 6 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/ucsi.asl | 6 | ||||
-rw-r--r-- | src/ec/google/wilco/acpi/vbtn.asl | 2 |
9 files changed, 39 insertions, 39 deletions
diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl index a0b05f370a..5344111167 100644 --- a/src/ec/google/chromeec/acpi/battery.asl +++ b/src/ec/google/chromeec/acpi/battery.asl @@ -7,12 +7,12 @@ Mutex (BATM, 0) // Wait for desired battery index to be presented in shared memory // Arg0 = battery index -// Returns Zero on success, 1 on error. +// Returns 0 on success, 1 on error. Method (BTSW, 1) { #ifdef EC_ENABLE_SECOND_BATTERY_DEVICE If (BTIX == Arg0) { - Return (Zero) + Return (0) } If (Arg0 >= BTCN) { Return (1) @@ -33,7 +33,7 @@ Method (BTSW, 1) Return (1) } #endif - Return (Zero) + Return (0) } // _STA implementation. @@ -41,7 +41,7 @@ Method (BTSW, 1) Method (BSTA, 1, Serialized) { If (Acquire (^BATM, 1000)) { - Return (Zero) + Return (0) } If (~BTSW (Arg0) & BTEX) { @@ -159,7 +159,7 @@ Method (BBST, 4, Serialized) // bit 1 = charging // bit 2 = critical level // - Local1 = Zero + Local1 = 0 // Check if AC is present If (ACEX) { @@ -277,10 +277,10 @@ Device (BAT0) 0xFFFFFFFF, // 0x02: Battery Remaining Capacity 0xFFFFFFFF, // 0x03: Battery Present Voltage }) - Name (BSTP, Zero) + Name (BSTP, 0) // Workaround for full battery status, disabled by default - Name (BFWK, Zero) + Name (BFWK, 0) // Method to enable full battery workaround Method (BFWE) @@ -291,7 +291,7 @@ Device (BAT0) // Method to disable full battery workaround Method (BFWD) { - BFWK = Zero + BFWK = 0 } Method (_STA, 0, Serialized) @@ -367,10 +367,10 @@ Device (BAT1) 0xFFFFFFFF, // 0x02: Battery Remaining Capacity 0xFFFFFFFF, // 0x03: Battery Present Voltage }) - Name (BSTP, Zero) + Name (BSTP, 0) // Workaround for full battery status, disabled by default - Name (BFWK, Zero) + Name (BFWK, 0) // Method to enable full battery workaround Method (BFWE) @@ -381,7 +381,7 @@ Device (BAT1) // Method to disable full battery workaround Method (BFWD) { - BFWK = Zero + BFWK = 0 } Method (_STA, 0, Serialized) diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl index af594683c7..2d44ae3c1b 100644 --- a/src/ec/google/chromeec/acpi/ec.asl +++ b/src/ec/google/chromeec/acpi/ec.asl @@ -198,22 +198,22 @@ Device (EC0) /* Check for sensor not calibrated */ If (Local0 == \_SB.PCI0.LPCB.EC0.TNCA) { - Return (Zero) + Return (0) } /* Check for sensor not present */ If (Local0 == \_SB.PCI0.LPCB.EC0.TNPR) { - Return (Zero) + Return (0) } /* Check for sensor not powered */ If (Local0 == \_SB.PCI0.LPCB.EC0.TNOP) { - Return (Zero) + Return (0) } /* Check for sensor bad reading */ If (Local0 == \_SB.PCI0.LPCB.EC0.TBAD) { - Return (Zero) + Return (0) } /* Adjust by offset to get Kelvin */ diff --git a/src/ec/google/wilco/acpi/battery.asl b/src/ec/google/wilco/acpi/battery.asl index d6b765578a..2ead4c8b81 100644 --- a/src/ec/google/wilco/acpi/battery.asl +++ b/src/ec/google/wilco/acpi/battery.asl @@ -10,7 +10,7 @@ Method (ESTA, 1, Serialized) } ElseIf (Arg0 == 2) { Local0 = R (P3B2) } Else { - Local0 = Zero + Local0 = 0 } /* Indicate battery is present */ @@ -42,7 +42,7 @@ Method (BSTR, 1, Serialized) /* Fill buffer until NUL or max string length is read */ Name (IBUF, Buffer (Local0 + 1) {}) - For (Local1 = Zero, Local1 < Local0, Local1++) { + For (Local1 = 0, Local1 < Local0, Local1++) { Local2 = R (BSBS) If (!Local2) { Break @@ -53,7 +53,7 @@ Method (BSTR, 1, Serialized) /* Truncate and NUL terminate */ Local1++ Name (OBUF, Buffer (Local1) {}) - OBUF = Concatenate (IBUF, Zero) + OBUF = Concatenate (IBUF, 0) Return (OBUF) } diff --git a/src/ec/google/wilco/acpi/ec.asl b/src/ec/google/wilco/acpi/ec.asl index b858b0cd8d..3a9256eb09 100644 --- a/src/ec/google/wilco/acpi/ec.asl +++ b/src/ec/google/wilco/acpi/ec.asl @@ -6,9 +6,9 @@ Device (EC0) Name (_UID, 1) Name (_GPE, EC_SCI_GPI) Name (_STA, 0xf) - Name (DBUG, Zero) - Name (ISSX, Zero) /* Is the EC in S0ix mode? */ - Name (UCEP, Zero) /* Is there a pending UCSI event? */ + Name (DBUG, 0) + Name (ISSX, 0) /* Is the EC in S0ix mode? */ + Name (UCEP, 0) /* Is there a pending UCSI event? */ Name (_CRS, ResourceTemplate() { IO (Decode16, @@ -22,7 +22,7 @@ Device (EC0) }) /* Handle registration of EmbeddedControl region */ - Name (EREG, Zero) + Name (EREG, 0) OperationRegion (ERAM, EmbeddedControl, 0, 0xff) Method (_REG, 2) { @@ -39,7 +39,7 @@ Device (EC0) W (CSOS, 1) /* Tell EC to stop emulating PS/2 mouse */ - W (PS2M, Zero) + W (PS2M, 0) /* Enable DPTF support if enabled in devicetree */ If (\DPTE == 1) { @@ -77,7 +77,7 @@ Device (EC0) Method (ECRW, 2, Serialized, 2) { If (!EREG) { - Return (Zero) + Return (0) } Local0 = DeRefOf (Arg0[0]) /* Byte offset */ @@ -115,7 +115,7 @@ Device (EC0) } BYT1 = Arg1 } - Return (Zero) + Return (0) } /* @@ -124,7 +124,7 @@ Device (EC0) */ Method (R, 1, Serialized, 2) { - Return (ECRW (Arg0, Zero)) + Return (ECRW (Arg0, 0)) } /* @@ -155,7 +155,7 @@ Device (EC0) R (EVT1) } Else { Printf ("EC Exit S0ix") - W (CSEX, Zero) + W (CSEX, 0) /* If UCSI event happened during S0ix send it now. */ If (^UCEP == 1) { diff --git a/src/ec/google/wilco/acpi/event.asl b/src/ec/google/wilco/acpi/event.asl index 47c2ecdaab..3f59946817 100644 --- a/src/ec/google/wilco/acpi/event.asl +++ b/src/ec/google/wilco/acpi/event.asl @@ -139,10 +139,10 @@ Method (_Q66, 0, Serialized) /* UCSI SCI uses a unique event code */ Method (_Q79, 0, Serialized) { - If (ISSX == Zero) { + If (ISSX == 0) { Printf ("EC _Q79 UCSI Event") Notify (^UCSI, 0x80) - ^UCEP = Zero + ^UCEP = 0 } Else { Printf ("EC _Q79 UCSI Event Masked in S0ix") ^UCEP = 1 diff --git a/src/ec/google/wilco/acpi/privacy.asl b/src/ec/google/wilco/acpi/privacy.asl index 74e65596c9..1922e97207 100644 --- a/src/ec/google/wilco/acpi/privacy.asl +++ b/src/ec/google/wilco/acpi/privacy.asl @@ -9,8 +9,8 @@ Method (GPVD, 0, Serialized) /* Read Privacy Screen Status */ Method (GPVX, 0, Serialized) { - If (R (EPST) == Zero) { - Return (Zero) + If (R (EPST) == 0) { + Return (0) } Return (1) @@ -25,5 +25,5 @@ Method (EPVX, 0, Serialized) /* Disable Privacy Screen */ Method (DPVX, 0, Serialized) { - W (EPCT, Zero) + W (EPCT, 0) } diff --git a/src/ec/google/wilco/acpi/superio.asl b/src/ec/google/wilco/acpi/superio.asl index 3cec006546..852965cb87 100644 --- a/src/ec/google/wilco/acpi/superio.asl +++ b/src/ec/google/wilco/acpi/superio.asl @@ -17,7 +17,7 @@ Device (SIO) #if CONFIG(DRIVERS_UART_8250IO) Return (0x0f) #else - Return (Zero) + Return (0) #endif } @@ -42,7 +42,7 @@ Scope (\_SB.PCI0) #ifdef SIO_EC_ENABLE_PS2K Return (0x0f) #else - Return (Zero) + Return (0) #endif } @@ -64,7 +64,7 @@ Scope (\_SB.PCI0) #ifdef SIO_EC_ENABLE_PS2M Return (0x0f) #else - Return (Zero) + Return (0) #endif } diff --git a/src/ec/google/wilco/acpi/ucsi.asl b/src/ec/google/wilco/acpi/ucsi.asl index 6c33e1867a..97e153b23a 100644 --- a/src/ec/google/wilco/acpi/ucsi.asl +++ b/src/ec/google/wilco/acpi/ucsi.asl @@ -69,12 +69,12 @@ Device (UCSI) Method (_DSM, 4, Serialized) { If (Arg0 != ToUUID ("6f8398c2-7ca4-11e4-ad36-631042b5008f")) { - Return (Buffer (1) { Zero }) + Return (Buffer (1) { 0 }) } Switch (ToInteger (Arg2)) { - Case (Zero) + Case (0) { Return (Buffer (1) { 0x07 }) } @@ -138,6 +138,6 @@ Device (UCSI) ^CCI3 = R (^^UCI3) } } - Return (Buffer (1) { Zero }) + Return (Buffer (1) { 0 }) } } diff --git a/src/ec/google/wilco/acpi/vbtn.asl b/src/ec/google/wilco/acpi/vbtn.asl index 622d5910bc..dbedbd1d8e 100644 --- a/src/ec/google/wilco/acpi/vbtn.asl +++ b/src/ec/google/wilco/acpi/vbtn.asl @@ -48,7 +48,7 @@ Device (VBTN) */ Method (VGBS) { - Local0 = Zero + Local0 = 0 /* Check EC orientation for tablet mode flag */ If (R (OTBL)) { |