summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2021-12-31 11:00:05 +0100
committerFelix Singer <felixsinger@posteo.net>2022-01-01 13:59:39 +0000
commit150daaf3e227b727d276e0e2056c9ff68b6799a9 (patch)
tree5a6cebbf6445ec4f2e769bda6d42ec962e637791 /src/ec
parent34fe2ba4472ad7ca59414edb0086e878fe51f1ac (diff)
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>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/apple/acpi/battery.asl24
1 files changed, 12 insertions, 12 deletions
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)