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>
This commit is contained in:
parent
c93781f96e
commit
8da3711edd
@ -81,15 +81,15 @@ Device (BAT0)
|
|||||||
Method (_BIF, 0, Serialized)
|
Method (_BIF, 0, Serialized)
|
||||||
{
|
{
|
||||||
// Update fields from EC
|
// Update fields from EC
|
||||||
Store (SWAB (BTDA), Index (PBIF, 1))
|
Store (SWAB (BTDA), PBIF[1])
|
||||||
Store (SWAB (BTDF), Index (PBIF, 2))
|
Store (SWAB (BTDF), PBIF[2])
|
||||||
Store (SWAB (BTDV), Index (PBIF, 4))
|
Store (SWAB (BTDV), PBIF[4])
|
||||||
Store (SWAB (BTDL), Index (PBIF, 6))
|
Store (SWAB (BTDL), PBIF[6])
|
||||||
|
|
||||||
// Get battery info from mainboard
|
// Get battery info from mainboard
|
||||||
Store (\BATM, Index (PBIF, 9))
|
Store (\BATM, PBIF[9])
|
||||||
Store (\BATS, Index (PBIF, 10))
|
Store (\BATS, PBIF[10])
|
||||||
Store (\BATV, Index (PBIF, 12))
|
Store (\BATV, PBIF[12])
|
||||||
|
|
||||||
Return (PBIF)
|
Return (PBIF)
|
||||||
}
|
}
|
||||||
@ -120,7 +120,7 @@ Device (BAT0)
|
|||||||
// 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])
|
||||||
|
|
||||||
// Notify if battery state has changed since last time
|
// Notify if battery state has changed since last time
|
||||||
If (LNotEqual (Local1, BSTP)) {
|
If (LNotEqual (Local1, BSTP)) {
|
||||||
@ -138,7 +138,7 @@ Device (BAT0)
|
|||||||
Xor (Local1, 0xFFFF, Local1)
|
Xor (Local1, 0xFFFF, Local1)
|
||||||
Increment (Local1)
|
Increment (Local1)
|
||||||
}
|
}
|
||||||
Store (Local1, Index (PBST, 1))
|
Store (Local1, PBST[1])
|
||||||
|
|
||||||
//
|
//
|
||||||
// 2: BATTERY REMAINING CAPACITY
|
// 2: BATTERY REMAINING CAPACITY
|
||||||
@ -165,12 +165,12 @@ Device (BAT0)
|
|||||||
Store (Local2, Local1)
|
Store (Local2, Local1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Store (Local1, Index (PBST, 2))
|
Store (Local1, PBST[2])
|
||||||
|
|
||||||
//
|
//
|
||||||
// 3: BATTERY PRESENT VOLTAGE
|
// 3: BATTERY PRESENT VOLTAGE
|
||||||
//
|
//
|
||||||
Store (SWAB (BTVO), Index (PBST, 3))
|
Store (SWAB (BTVO), PBST[3])
|
||||||
|
|
||||||
Return (PBST)
|
Return (PBST)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user