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/purism/librem-ec/acpi/battery.asl | 18 +++++++++--------- src/ec/purism/librem-ec/acpi/ec.asl | 12 ++++++------ src/ec/purism/librem-ec/acpi/ec_ram.asl | 2 +- src/ec/purism/librem-ec/acpi/hid.asl | 18 +++++++++--------- src/ec/purism/librem-ec/acpi/librem-ec.asl | 4 ++-- 5 files changed, 27 insertions(+), 27 deletions(-) (limited to 'src/ec/purism/librem-ec') diff --git a/src/ec/purism/librem-ec/acpi/battery.asl b/src/ec/purism/librem-ec/acpi/battery.asl index 0266c2a75d..6b1572bd49 100644 --- a/src/ec/purism/librem-ec/acpi/battery.asl +++ b/src/ec/purism/librem-ec/acpi/battery.asl @@ -5,12 +5,12 @@ Device (BAT0) { Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */) // _HID: Hardware ID - Name (_UID, Zero) // _UID: Unique ID + Name (_UID, 0) // _UID: Unique ID Name (_PCL, Package (0x01) // _PCL: Power Consumer List { _SB }) - Name (BFCC, Zero) + Name (BFCC, 0) Method (_STA, 0, NotSerialized) // _STA: Status { If (^^PCI0.LPCB.EC0.ECOK) @@ -37,8 +37,8 @@ Device (BAT0) 0xFFFFFFFF, // 2 - Last Full Charge Capacity 1, // 3 - Battery Technology BATTERY_DESIGN_VOLTAGE_MV, // 4 - Design Voltage - Zero, // 5 - Design Capacity of Warning - Zero, // 6 - Design Capacity of Low + 0, // 5 - Design Capacity of Warning + 0, // 6 - Design Capacity of Low 0x40, // 7 - Battery Capacity Granularity 1 0x40, // 8 - Battery Capacity Granularity 2 "BAT", // 9 - Model Number @@ -55,7 +55,7 @@ Device (BAT0) PBIF [10] = " " PBIF [11] = " " PBIF [12] = " " - BFCC = Zero + BFCC = 0 } Method (UPBI, 0, NotSerialized) @@ -100,14 +100,14 @@ Device (BAT0) Name (PBST, Package (0x04) { - Zero, // 0 - Battery state + 0, // 0 - Battery state 0xFFFFFFFF, // 1 - Battery present rate 0xFFFFFFFF, // 2 - Battery remaining capacity BATTERY_DESIGN_VOLTAGE_MV // 3 - Battery present voltage }) Method (IVBS, 0, NotSerialized) { - PBST [0] = Zero + PBST [0] = 0 PBST [1] = 0xFFFFFFFF PBST [2] = 0xFFFFFFFF PBST [3] = 0x2710 @@ -117,8 +117,8 @@ Device (BAT0) { If (^^PCI0.LPCB.EC0.BAT0) { - Local0 = Zero - Local1 = Zero + Local0 = 0 + Local1 = 0 If (^^AC.ACFG) { If (((^^PCI0.LPCB.EC0.BST0 & 0x02) == 0x02)) diff --git a/src/ec/purism/librem-ec/acpi/ec.asl b/src/ec/purism/librem-ec/acpi/ec.asl index bceb23c92d..083d2c03e1 100644 --- a/src/ec/purism/librem-ec/acpi/ec.asl +++ b/src/ec/purism/librem-ec/acpi/ec.asl @@ -31,7 +31,7 @@ Device (\_SB.PCI0.LPCB.EC0) #include "ec_ram.asl" - Name (ECOK, Zero) + Name (ECOK, 0) Method (_REG, 2, Serialized) // _REG: Region Availability { Printf ("EC: _REG %o %o", ToHexString(Arg0), ToHexString(Arg1)) @@ -49,8 +49,8 @@ Device (\_SB.PCI0.LPCB.EC0) ^^^^BAT0.UPBS() // Notify of changes - Notify(^^^^AC, Zero) - Notify(^^^^BAT0, Zero) + Notify(^^^^AC, 0) + Notify(^^^^BAT0, 0) PNOT () @@ -66,7 +66,7 @@ Device (\_SB.PCI0.LPCB.EC0) Printf ("EC: PTS: %o", ToHexString(Arg0)) If (ECOK) { // Clear wake cause - WFNO = Zero + WFNO = 0 } } @@ -81,8 +81,8 @@ Device (\_SB.PCI0.LPCB.EC0) ^^^^BAT0.UPBS() // Notify of changes - Notify(^^^^AC, Zero) - Notify(^^^^BAT0, Zero) + Notify(^^^^AC, 0) + Notify(^^^^BAT0, 0) // Reset Librem EC Device ^^^^LIEC.RSET() diff --git a/src/ec/purism/librem-ec/acpi/ec_ram.asl b/src/ec/purism/librem-ec/acpi/ec_ram.asl index ce5133f52e..704efefbec 100644 --- a/src/ec/purism/librem-ec/acpi/ec_ram.asl +++ b/src/ec/purism/librem-ec/acpi/ec_ram.asl @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF) +OperationRegion (ERAM, EmbeddedControl, 0, 0xFF) Field (ERAM, ByteAcc, Lock, Preserve) { Offset (0x03), diff --git a/src/ec/purism/librem-ec/acpi/hid.asl b/src/ec/purism/librem-ec/acpi/hid.asl index 8bbb65bc45..eb5f420cce 100644 --- a/src/ec/purism/librem-ec/acpi/hid.asl +++ b/src/ec/purism/librem-ec/acpi/hid.asl @@ -3,19 +3,19 @@ Device (HIDD) { Name (_HID, "INT33D5") - Name (HBSY, Zero) - Name (HIDX, Zero) - Name (HRDY, Zero) + Name (HBSY, 0) + Name (HIDX, 0) + Name (HRDY, 0) Method (HDEM, 0, Serialized) { - HBSY = Zero + HBSY = 0 Return (HIDX) } Method (HDMM, 0, Serialized) { - Return (Zero) + Return (0) } Method (HDSM, 1, Serialized) @@ -29,7 +29,7 @@ Device (HIDD) HIDX = Arg0 Notify (HIDD, 0xC0) - Local0 = Zero + Local0 = 0 While ((Local0 < 0xFA) && HBSY) { Sleep (0x04) @@ -38,13 +38,13 @@ Device (HIDD) If (HBSY == 1) { - HBSY = Zero - HIDX = Zero + HBSY = 0 + HIDX = 0 Return (1) } Else { - Return (Zero) + Return (0) } } } diff --git a/src/ec/purism/librem-ec/acpi/librem-ec.asl b/src/ec/purism/librem-ec/acpi/librem-ec.asl index 5f1e53d666..dceef09781 100644 --- a/src/ec/purism/librem-ec/acpi/librem-ec.asl +++ b/src/ec/purism/librem-ec/acpi/librem-ec.asl @@ -113,7 +113,7 @@ Device (LIEC) { ^^PCI0.LPCB.EC0.FDAT = 1 ^^PCI0.LPCB.EC0.FCMD = 0xCA Local0 = ^^PCI0.LPCB.EC0.FBUF - ^^PCI0.LPCB.EC0.FCMD = Zero + ^^PCI0.LPCB.EC0.FCMD = 0 } Return (Local0) } @@ -121,7 +121,7 @@ Device (LIEC) { // Set KB Led Method (SKBL, 1, Serialized) { If (^^PCI0.LPCB.EC0.ECOK) { - ^^PCI0.LPCB.EC0.FDAT = Zero + ^^PCI0.LPCB.EC0.FDAT = 0 ^^PCI0.LPCB.EC0.FBUF = Arg0 ^^PCI0.LPCB.EC0.FCMD = 0xCA } -- cgit v1.2.3