summaryrefslogtreecommitdiff
path: root/src/ec/smsc/mec1308
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2021-12-29 14:16:34 +0100
committerFelix Singer <felixsinger@posteo.net>2021-12-30 14:30:31 +0000
commit8da3711edd7e688a3db2560f71a68ef19e82e1a3 (patch)
treee4df49f7d5a957b8a5cf03867a8e2cfaaa826cd9 /src/ec/smsc/mec1308
parentc93781f96ec5ef615e91ea42d5e0b827718fc6eb (diff)
ec/smsc/mec1308/acpi: Use ASL 2.0 syntax to access arrays
Replace Index(FOO, 1337) with FOO[1337]. Change-Id: I628a6108e12ba784542474ebe58285754f40169c Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60459 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Diffstat (limited to 'src/ec/smsc/mec1308')
-rw-r--r--src/ec/smsc/mec1308/acpi/battery.asl22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/ec/smsc/mec1308/acpi/battery.asl b/src/ec/smsc/mec1308/acpi/battery.asl
index fad69b802a..a072c93ae8 100644
--- a/src/ec/smsc/mec1308/acpi/battery.asl
+++ b/src/ec/smsc/mec1308/acpi/battery.asl
@@ -81,15 +81,15 @@ Device (BAT0)
Method (_BIF, 0, Serialized)
{
// Update fields from EC
- Store (SWAB (BTDA), Index (PBIF, 1))
- Store (SWAB (BTDF), Index (PBIF, 2))
- Store (SWAB (BTDV), Index (PBIF, 4))
- Store (SWAB (BTDL), Index (PBIF, 6))
+ Store (SWAB (BTDA), PBIF[1])
+ Store (SWAB (BTDF), PBIF[2])
+ Store (SWAB (BTDV), PBIF[4])
+ Store (SWAB (BTDL), PBIF[6])
// Get battery info from mainboard
- Store (\BATM, Index (PBIF, 9))
- Store (\BATS, Index (PBIF, 10))
- Store (\BATV, Index (PBIF, 12))
+ Store (\BATM, PBIF[9])
+ Store (\BATS, PBIF[10])
+ Store (\BATV, PBIF[12])
Return (PBIF)
}
@@ -120,7 +120,7 @@ Device (BAT0)
// Flag if the battery level is critical
And (Local0, 0x04, Local4)
Or (Local1, Local4, Local1)
- Store (Local1, Index (PBST, 0))
+ Store (Local1, PBST[0])
// Notify if battery state has changed since last time
If (LNotEqual (Local1, BSTP)) {
@@ -138,7 +138,7 @@ Device (BAT0)
Xor (Local1, 0xFFFF, Local1)
Increment (Local1)
}
- Store (Local1, Index (PBST, 1))
+ Store (Local1, PBST[1])
//
// 2: BATTERY REMAINING CAPACITY
@@ -165,12 +165,12 @@ Device (BAT0)
Store (Local2, Local1)
}
}
- Store (Local1, Index (PBST, 2))
+ Store (Local1, PBST[2])
//
// 3: BATTERY PRESENT VOLTAGE
//
- Store (SWAB (BTVO), Index (PBST, 3))
+ Store (SWAB (BTVO), PBST[3])
Return (PBST)
}