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>
This commit is contained in:
parent
2bdffaa272
commit
c13aea6810
|
@ -106,7 +106,7 @@ Device (BATX)
|
||||||
// ACPI spec : 0 - mWh : 1 - mAh
|
// ACPI spec : 0 - mWh : 1 - mAh
|
||||||
//
|
//
|
||||||
Store(SBCM, Local7)
|
Store(SBCM, Local7)
|
||||||
XOr (Local7, One, Index (PBIF, 0))
|
XOr (Local7, One, PBIF[0])
|
||||||
|
|
||||||
//
|
//
|
||||||
// Information ID 0 -
|
// Information ID 0 -
|
||||||
|
@ -119,11 +119,11 @@ Device (BATX)
|
||||||
//
|
//
|
||||||
If (Local7)
|
If (Local7)
|
||||||
{
|
{
|
||||||
Multiply (SBFC, 10, Index (PBIF, 2))
|
Multiply (SBFC, 10, PBIF[2])
|
||||||
}
|
}
|
||||||
Else
|
Else
|
||||||
{
|
{
|
||||||
Store (SBFC, Index (PBIF, 2))
|
Store (SBFC, PBIF[2])
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -143,24 +143,24 @@ Device (BATX)
|
||||||
{
|
{
|
||||||
Store (SBDC, Local0)
|
Store (SBDC, Local0)
|
||||||
}
|
}
|
||||||
Store (Local0, Index(PBIF, One))
|
Store (Local0, PBIF[1])
|
||||||
|
|
||||||
//
|
//
|
||||||
// Design capacity of High (5%)
|
// Design capacity of High (5%)
|
||||||
// Design capacity of Low (1%)
|
// Design capacity of Low (1%)
|
||||||
//
|
//
|
||||||
Divide (Local0, 20, , Index (PBIF, 5))
|
Divide (Local0, 20, , PBIF[5])
|
||||||
Divide (Local0, 100, , Index (PBIF, 6))
|
Divide (Local0, 100, , PBIF[6])
|
||||||
|
|
||||||
//
|
//
|
||||||
// Design voltage
|
// Design voltage
|
||||||
//
|
//
|
||||||
Store (SBDV, Index (PBIF, 4))
|
Store (SBDV, PBIF[4])
|
||||||
|
|
||||||
//
|
//
|
||||||
// Serial Number
|
// Serial Number
|
||||||
//
|
//
|
||||||
Store (ToHexString (SBSN), Index (PBIF, 10))
|
Store (ToHexString (SBSN), PBIF[10])
|
||||||
|
|
||||||
//
|
//
|
||||||
// Information ID 4 -
|
// Information ID 4 -
|
||||||
|
@ -171,7 +171,7 @@ Device (BATX)
|
||||||
//
|
//
|
||||||
// Battery Type - Device Chemistry
|
// Battery Type - Device Chemistry
|
||||||
//
|
//
|
||||||
Store (ToString (Concatenate(SBCH, 0x00)), Index (PBIF, 11))
|
Store (ToString (Concatenate(SBCH, 0x00)), PBIF[11])
|
||||||
|
|
||||||
//
|
//
|
||||||
// Information ID 5 -
|
// Information ID 5 -
|
||||||
|
@ -182,7 +182,7 @@ Device (BATX)
|
||||||
//
|
//
|
||||||
// OEM Information - Manufacturer Name
|
// OEM Information - Manufacturer Name
|
||||||
//
|
//
|
||||||
Store (ToString (Concatenate(SBMN, 0x00)), Index (PBIF, 12))
|
Store (ToString (Concatenate(SBMN, 0x00)), PBIF[12])
|
||||||
|
|
||||||
//
|
//
|
||||||
// Information ID 6 -
|
// Information ID 6 -
|
||||||
|
@ -193,7 +193,7 @@ Device (BATX)
|
||||||
//
|
//
|
||||||
// Model Number - Device Name
|
// Model Number - Device Name
|
||||||
//
|
//
|
||||||
Store (ToString (Concatenate(SBDN, 0x00)), Index (PBIF, 9))
|
Store (ToString (Concatenate(SBDN, 0x00)), PBIF[9])
|
||||||
|
|
||||||
Return (PBIF)
|
Return (PBIF)
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,7 @@ Device (BATX)
|
||||||
// Flag if the battery level is critical
|
// Flag if the battery level is critical
|
||||||
And (Local0, 0x04, Local4)
|
And (Local0, 0x04, Local4)
|
||||||
Or (Local1, Local4, Local1)
|
Or (Local1, Local4, Local1)
|
||||||
Store (Local1, Index (PBST, 0))
|
Store (Local1, PBST[0])
|
||||||
|
|
||||||
//
|
//
|
||||||
// 1: BATTERY PRESENT RATE/CURRENT
|
// 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)
|
If (Local6)
|
||||||
{
|
{
|
||||||
Multiply (ECVO, Local1, Local1)
|
Multiply (ECVO, Local1, Local1)
|
||||||
Divide (Local1, 1000, , Local1)
|
Divide (Local1, 1000, , Local1)
|
||||||
}
|
}
|
||||||
Store (Local1, Index (PBST, One))
|
Store (Local1, PBST[1])
|
||||||
|
|
||||||
//
|
//
|
||||||
// 2: BATTERY REMAINING CAPACITY
|
// 2: BATTERY REMAINING CAPACITY
|
||||||
|
@ -323,12 +323,12 @@ Device (BATX)
|
||||||
Store (Local2, Local1)
|
Store (Local2, Local1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Store (Local1, Index (PBST, 2))
|
Store (Local1, PBST[2])
|
||||||
|
|
||||||
//
|
//
|
||||||
// 3: BATTERY PRESENT VOLTAGE
|
// 3: BATTERY PRESENT VOLTAGE
|
||||||
//
|
//
|
||||||
Store (ECVO, Index (PBST, 3))
|
Store (ECVO, PBST[3])
|
||||||
|
|
||||||
Return (PBST)
|
Return (PBST)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue