Felix Singer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/60563 )
Change subject: ec/apple/acpi: Replace Index() with ASL 2.0 syntax ......................................................................
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 felixsinger@posteo.net Reviewed-on: https://review.coreboot.org/c/coreboot/+/60563 Reviewed-by: HAOUAS Elyes ehaouas@noos.fr Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/ec/apple/acpi/battery.asl 1 file changed, 12 insertions(+), 12 deletions(-)
Approvals: build bot (Jenkins): Verified HAOUAS Elyes: Looks good to me, approved
diff --git a/src/ec/apple/acpi/battery.asl b/src/ec/apple/acpi/battery.asl index 291451f..6d4ab57 100644 --- a/src/ec/apple/acpi/battery.asl +++ b/src/ec/apple/acpi/battery.asl @@ -91,13 +91,13 @@
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 @@ }
Local1 = ^^SBRW(0x0B, 0x09) - Index(BATI, 0x03) = Local1 + BATI[3] = Local1 Local0 = ^^SBRW(0x0B, 0x0A)
/* Sign-extend Local0. */ @@ -136,16 +136,16 @@ }
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)