From 150daaf3e227b727d276e0e2056c9ff68b6799a9 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Fri, 31 Dec 2021 11:00:05 +0100 Subject: ec/apple/acpi: Replace Index() with ASL 2.0 syntax Replace `Index (FOO, 0)` with `FOO[0]`. Change-Id: I7b73e490e0a88a3693d7eaaf0fa37d0ea75b2529 Signed-off-by: Felix Singer Reviewed-on: https://review.coreboot.org/c/coreboot/+/60563 Reviewed-by: HAOUAS Elyes Tested-by: build bot (Jenkins) --- src/ec/apple/acpi/battery.asl | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'src/ec/apple') diff --git a/src/ec/apple/acpi/battery.asl b/src/ec/apple/acpi/battery.asl index 291451f414..6d4ab57c63 100644 --- a/src/ec/apple/acpi/battery.asl +++ b/src/ec/apple/acpi/battery.asl @@ -91,13 +91,13 @@ Device(BAT0) Method(_BIF, 0, NotSerialized) { - Index(BATS, 0x01) = ^^SBRW(0x0B, 0x18) * 10 - Index(BATS, 0x02) = ^^SBRW(0x0B, 0x10) * 10 + BATS[1] = ^^SBRW(0x0B, 0x18) * 10 + BATS[2] = ^^SBRW(0x0B, 0x10) * 10 - Index(BATS, 0x04) = ^^SBRW(0x0B, 0x19) - Index(BATS, 0x09) = ^^SBRB(0x0B, 0x21) - Index(BATS, 0x0B) = ^^SBRB(0x0B, 0x22) - Index(BATS, 0x0C) = ^^SBRB(0x0B, 0x20) + BATS[4] = ^^SBRW(0x0B, 0x19) + BATS[9] = ^^SBRB(0x0B, 0x21) + BATS[11] = ^^SBRB(0x0B, 0x22) + BATS[12] = ^^SBRB(0x0B, 0x20) Return(BATS) } @@ -124,7 +124,7 @@ Device(BAT0) } Local1 = ^^SBRW(0x0B, 0x09) - Index(BATI, 0x03) = Local1 + BATI[3] = Local1 Local0 = ^^SBRW(0x0B, 0x0A) /* Sign-extend Local0. */ @@ -136,16 +136,16 @@ Device(BAT0) } Local0 *= Local1 - Index(BATI, 1) = Local0 / 1000 - Index(BATI, 2) = ^^SBRW(0x0B, 0x0F) * 10 + BATI[1] = Local0 / 1000 + BATI[2] = ^^SBRW(0x0B, 0x0F) * 10 If (HPAC) { If (!(^^SBRW(0x0B, 0x16) & 0x40)) { - Index(BATI, 0) = 2 + BATI[0] = 2 } Else { - Index(BATI, 0) = 0 + BATI[0] = 0 } } Else { - Index(BATI, 0) = 1 + BATI[0] = 1 } Return(BATI) -- cgit v1.2.3