From 42efd7f593c9d270ff330d1282d9c569d1ec709a Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Mon, 26 Dec 2022 09:38:45 +0100 Subject: {superio,ec}/acpi: Replace constant "Zero" with actual number Change-Id: I449ec5b0bbf3f24d51688efef151d3018d2848b2 Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/71524 Reviewed-by: Elyes Haouas Tested-by: build bot (Jenkins) --- src/ec/google/wilco/acpi/battery.asl | 6 +++--- src/ec/google/wilco/acpi/ec.asl | 18 +++++++++--------- src/ec/google/wilco/acpi/event.asl | 4 ++-- src/ec/google/wilco/acpi/privacy.asl | 6 +++--- src/ec/google/wilco/acpi/superio.asl | 6 +++--- src/ec/google/wilco/acpi/ucsi.asl | 6 +++--- src/ec/google/wilco/acpi/vbtn.asl | 2 +- 7 files changed, 24 insertions(+), 24 deletions(-) (limited to 'src/ec/google/wilco/acpi') 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)) { -- cgit v1.2.3