Felix Singer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/60459 )
Change subject: ec/smsc/mec1308/acpi: Use ASL 2.0 syntax to access arrays
......................................................................
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(a)posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60459
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas(a)noos.fr>
---
M src/ec/smsc/mec1308/acpi/battery.asl
1 file changed, 11 insertions(+), 11 deletions(-)
Approvals:
build bot (Jenkins): Verified
HAOUAS Elyes: Looks good to me, approved
diff --git a/src/ec/smsc/mec1308/acpi/battery.asl b/src/ec/smsc/mec1308/acpi/battery.asl
index fad69b8..a072c93 100644
--- a/src/ec/smsc/mec1308/acpi/battery.asl
+++ b/src/ec/smsc/mec1308/acpi/battery.asl
@@ -81,15 +81,15 @@
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 @@
// 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 @@
Xor (Local1, 0xFFFF, Local1)
Increment (Local1)
}
- Store (Local1, Index (PBST, 1))
+ Store (Local1, PBST[1])
//
// 2: BATTERY REMAINING CAPACITY
@@ -165,12 +165,12 @@
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)
}
--
To view, visit https://review.coreboot.org/c/coreboot/+/60459
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I628a6108e12ba784542474ebe58285754f40169c
Gerrit-Change-Number: 60459
Gerrit-PatchSet: 3
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged
Felix Singer has submitted this change. ( https://review.coreboot.org/c/coreboot/+/60457 )
Change subject: ec/google/chromeec/acpi: Use ASL 2.0 syntax to access arrays
......................................................................
ec/google/chromeec/acpi: Use ASL 2.0 syntax to access arrays
Replace Index(FOO, 1337) with FOO[1337].
Change-Id: I2fb96e338b332f4fbb3bd23fb07bb1ca36c19c49
Signed-off-by: Felix Singer <felixsinger(a)posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60457
Reviewed-by: HAOUAS Elyes <ehaouas(a)noos.fr>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
---
M src/ec/google/chromeec/acpi/battery.asl
1 file changed, 21 insertions(+), 21 deletions(-)
Approvals:
build bot (Jenkins): Verified
HAOUAS Elyes: Looks good to me, approved
diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl
index d9304c1..fc9edc9 100644
--- a/src/ec/google/chromeec/acpi/battery.asl
+++ b/src/ec/google/chromeec/acpi/battery.asl
@@ -68,27 +68,27 @@
Return (Arg1)
}
// Last Full Charge Capacity
- Store (BTDF, Index (Arg1, 2))
+ Store (BTDF, Arg1[2])
// Design Voltage
- Store (BTDV, Index (Arg1, 4))
+ Store (BTDV, Arg1[4])
// Design Capacity
Store (BTDA, Local0)
- Store (Local0, Index (Arg1, 1))
+ Store (Local0, Arg1[1])
// Design Capacity of Warning
Divide (Multiply (Local0, DWRN), 100, , Local2)
- Store (Local2, Index (Arg1, 5))
+ Store (Local2, Arg1[5])
// Design Capacity of Low
Divide (Multiply (Local0, DLOW), 100, , Local2)
- Store (Local2, Index (Arg1, 6))
+ Store (Local2, Arg1[6])
// Get battery info from mainboard
- Store (ToString(Concatenate(BMOD, 0x00)), Index (Arg1, 9))
- Store (ToString(Concatenate(BSER, 0x00)), Index (Arg1, 10))
- Store (ToString(Concatenate(BMFG, 0x00)), Index (Arg1, 12))
+ Store (ToString(Concatenate(BMOD, 0x00)), Arg1[9])
+ Store (ToString(Concatenate(BSER, 0x00)), Arg1[10])
+ Store (ToString(Concatenate(BMFG, 0x00)), Arg1[12])
Release (^BATM)
Return (Arg1)
@@ -108,30 +108,30 @@
Return (Arg1)
}
// Last Full Charge Capacity
- Store (BTDF, Index (Arg1, 3))
+ Store (BTDF, Arg1[3])
// Design Voltage
- Store (BTDV, Index (Arg1, 5))
+ Store (BTDV, Arg1[5])
// Design Capacity
Store (BTDA, Local0)
- Store (Local0, Index (Arg1, 2))
+ Store (Local0, Arg1[2])
// Design Capacity of Warning
Divide (Multiply (Local0, DWRN), 100, , Local2)
- Store (Local2, Index (Arg1, 6))
+ Store (Local2, Arg1[6])
// Design Capacity of Low
Divide (Multiply (Local0, DLOW), 100, , Local2)
- Store (Local2, Index (Arg1, 7))
+ Store (Local2, Arg1[7])
// Cycle Count
- Store (BTCC, Index (Arg1, 8))
+ Store (BTCC, Arg1[8])
// Get battery info from mainboard
- Store (ToString(Concatenate(BMOD, 0x00)), Index (Arg1, 16))
- Store (ToString(Concatenate(BSER, 0x00)), Index (Arg1, 17))
- Store (ToString(Concatenate(BMFG, 0x00)), Index (Arg1, 19))
+ Store (ToString(Concatenate(BMOD, 0x00)), Arg1[16])
+ Store (ToString(Concatenate(BSER, 0x00)), Arg1[17])
+ Store (ToString(Concatenate(BMFG, 0x00)), Arg1[19])
Release (^BATM)
Return (Arg1)
@@ -177,7 +177,7 @@
If (BFCR) {
Or (Local1, 0x04, Local1)
}
- Store (Local1, Index (Arg1, 0))
+ Store (Local1, Arg1[0])
// Notify if battery state has changed since last time
If (LNotEqual (Local1, DeRefOf (Arg2))) {
@@ -195,7 +195,7 @@
//
// 1: BATTERY PRESENT RATE
//
- Store (BTPR, Index (Arg1, 1))
+ Store (BTPR, Arg1[1])
//
// 2: BATTERY REMAINING CAPACITY
@@ -216,12 +216,12 @@
Store (Local2, Local1)
}
}
- Store (Local1, Index (Arg1, 2))
+ Store (Local1, Arg1[2])
//
// 3: BATTERY PRESENT VOLTAGE
//
- Store (BTVO, Index (Arg1, 3))
+ Store (BTVO, Arg1[3])
Release (^BATM)
Return (Arg1)
--
To view, visit https://review.coreboot.org/c/coreboot/+/60457
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2fb96e338b332f4fbb3bd23fb07bb1ca36c19c49
Gerrit-Change-Number: 60457
Gerrit-PatchSet: 4
Gerrit-Owner: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas(a)noos.fr>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak(a)chromium.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Paul Menzel <paulepanter(a)mailbox.org>
Gerrit-MessageType: merged