summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2021-12-29 13:48:25 +0100
committerFelix Singer <felixsinger@posteo.net>2021-12-30 14:26:01 +0000
commitc13aea6810f352b24cf6a61350b81524b9b719d3 (patch)
treef856fef8b95af75bb0f5ef4c18f03d0d3b388417 /src
parent2bdffaa27215037af6cb137ff0d2f0a7f75232e7 (diff)
ec/quanta/it8518/acpi: Use ASL 2.0 syntax to access arrays
Replace Index(FOO, 1337) with FOO[1337]. Change-Id: I0b1fe0fcdf2862dc76f07ef1478929f7c726ac47 Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60455 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/ec/quanta/it8518/acpi/battery.asl32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/ec/quanta/it8518/acpi/battery.asl b/src/ec/quanta/it8518/acpi/battery.asl
index 768f2b12e4..adbde93044 100644
--- a/src/ec/quanta/it8518/acpi/battery.asl
+++ b/src/ec/quanta/it8518/acpi/battery.asl
@@ -106,7 +106,7 @@ Device (BATX)
// ACPI spec : 0 - mWh : 1 - mAh
//
Store(SBCM, Local7)
- XOr (Local7, One, Index (PBIF, 0))
+ XOr (Local7, One, PBIF[0])
//
// Information ID 0 -
@@ -119,11 +119,11 @@ Device (BATX)
//
If (Local7)
{
- Multiply (SBFC, 10, Index (PBIF, 2))
+ Multiply (SBFC, 10, PBIF[2])
}
Else
{
- Store (SBFC, Index (PBIF, 2))
+ Store (SBFC, PBIF[2])
}
//
@@ -143,24 +143,24 @@ Device (BATX)
{
Store (SBDC, Local0)
}
- Store (Local0, Index(PBIF, One))
+ Store (Local0, PBIF[1])
//
// Design capacity of High (5%)
// Design capacity of Low (1%)
//
- Divide (Local0, 20, , Index (PBIF, 5))
- Divide (Local0, 100, , Index (PBIF, 6))
+ Divide (Local0, 20, , PBIF[5])
+ Divide (Local0, 100, , PBIF[6])
//
// Design voltage
//
- Store (SBDV, Index (PBIF, 4))
+ Store (SBDV, PBIF[4])
//
// Serial Number
//
- Store (ToHexString (SBSN), Index (PBIF, 10))
+ Store (ToHexString (SBSN), PBIF[10])
//
// Information ID 4 -
@@ -171,7 +171,7 @@ Device (BATX)
//
// Battery Type - Device Chemistry
//
- Store (ToString (Concatenate(SBCH, 0x00)), Index (PBIF, 11))
+ Store (ToString (Concatenate(SBCH, 0x00)), PBIF[11])
//
// Information ID 5 -
@@ -182,7 +182,7 @@ Device (BATX)
//
// OEM Information - Manufacturer Name
//
- Store (ToString (Concatenate(SBMN, 0x00)), Index (PBIF, 12))
+ Store (ToString (Concatenate(SBMN, 0x00)), PBIF[12])
//
// Information ID 6 -
@@ -193,7 +193,7 @@ Device (BATX)
//
// Model Number - Device Name
//
- Store (ToString (Concatenate(SBDN, 0x00)), Index (PBIF, 9))
+ Store (ToString (Concatenate(SBDN, 0x00)), PBIF[9])
Return (PBIF)
}
@@ -255,7 +255,7 @@ Device (BATX)
// Flag if the battery level is critical
And (Local0, 0x04, Local4)
Or (Local1, Local4, Local1)
- Store (Local1, Index (PBST, 0))
+ Store (Local1, PBST[0])
//
// 1: BATTERY PRESENT RATE/CURRENT
@@ -282,14 +282,14 @@ Device (BATX)
}
}
- XOr (DerefOf (Index (PBIF, Zero)), One, Local6)
+ XOr (DerefOf (PBIF[0]), One, Local6)
If (Local6)
{
Multiply (ECVO, Local1, Local1)
Divide (Local1, 1000, , Local1)
}
- Store (Local1, Index (PBST, One))
+ Store (Local1, PBST[1])
//
// 2: BATTERY REMAINING CAPACITY
@@ -323,12 +323,12 @@ Device (BATX)
Store (Local2, Local1)
}
}
- Store (Local1, Index (PBST, 2))
+ Store (Local1, PBST[2])
//
// 3: BATTERY PRESENT VOLTAGE
//
- Store (ECVO, Index (PBST, 3))
+ Store (ECVO, PBST[3])
Return (PBST)
}