There's an off-by-one error in the ACPI GP_LVL declaration: it declares GL00 with a bit count of 6, and continues with GP07 afterwards. This should be GP06, as the first bitfield covers GP00-GP05.
While at it, change it to GP00-GP05, as right now GL00 isn't used, and single bitfield are more usable here.
Als adjust the Getac P470, as this is the only user of those defintions right now.
Signed-off-by: Sven Schnelle svens@stackframe.org --- src/mainboard/getac/p470/acpi/ec.asl | 26 +++++++------- src/southbridge/intel/i82801gx/acpi/ich7.asl | 46 ++++++++++++++----------- 2 files changed, 39 insertions(+), 33 deletions(-)
diff --git a/src/mainboard/getac/p470/acpi/ec.asl b/src/mainboard/getac/p470/acpi/ec.asl index 30e78fa..6538b83 100644 --- a/src/mainboard/getac/p470/acpi/ec.asl +++ b/src/mainboard/getac/p470/acpi/ec.asl @@ -491,16 +491,16 @@ Scope(_SB) If(And(RFDV, 0x08)) { Or(Local0, 0x08, Local0) } - If(And(GP16, 0x01)) { // GDIS + If(And(GP15, 0x01)) { // GDIS Or(Local0, 0x10, Local0) } - If(And(GP13, 0x01)) { // WIFI Led (WLED) + If(And(GP12, 0x01)) { // WIFI Led (WLED) Or(Local0, 0x20, Local0) } If(And(BTEN, 0x01)) { // BlueTooth Enable Or(Local0, 0x40, Local0) } - If(And(GP11, 0x01)) { // GPS Enable + If(And(GP10, 0x01)) { // GPS Enable Or(Local0, 0x80, Local0) }
@@ -511,28 +511,28 @@ Scope(_SB) Method(SRFD, 1, Serialized) { If (And(Arg0, 0x01)) { - Store (1, GP15) // GLED - Store (1, GP16) // GDIS + Store (1, GP14) // GLED + Store (1, GP15) // GDIS } Else { + Store (0, GP14) Store (0, GP15) - Store (0, GP16) }
/* WIFI */ If (And(Arg0, 0x02)) { - Store (1, GP13) // WLED - Store (1, GP26) // WLAN + Store (1, GP12) // WLED + Store (1, GP25) // WLAN } Else { - Store (0, GP13) - Store (0, GP26) + Store (0, GP12) + Store (0, GP25) }
/* Bluetooth */ If (And(Arg0, 0x04)) { - Store (1, GP14) // BLED + Store (1, GP13) // BLED Store (1, BTEN) } Else { - Store (0, GP14) // BLED + Store (0, GP13) // BLED Store (0, BTEN) } Return (0) @@ -577,7 +577,7 @@ Scope(_SB) /* ??? */ Method(GTSD, 0, Serialized) { - Return (GP20) // TSDT + Return (GP19) // TSDT }
/* Not even decent function names anymore? */ diff --git a/src/southbridge/intel/i82801gx/acpi/ich7.asl b/src/southbridge/intel/i82801gx/acpi/ich7.asl index 8387b20..ad5bdd0 100644 --- a/src/southbridge/intel/i82801gx/acpi/ich7.asl +++ b/src/southbridge/intel/i82801gx/acpi/ich7.asl @@ -59,29 +59,35 @@ Scope() GIO2, 8, GIO3, 8, Offset(0x0c), // GPIO Level - GL00, 6, - GP07, 1, // GDET + GP00, 1, + GP01, 1, + GP02, 1, + GP03, 1, + GP04, 1, + GP05, 1, + GP06, 1, // GDET + GP07, 1, GP08, 1, - GP09, 1, - GP10, 1, // HPMU - GP11, 1, // GPSE - GP12, 1, - GP13, 1, // WLED - GP14, 1, // BLED - GP15, 1, // GLED - GP16, 1, // GDIS + GP09, 1, // HPMU + GP10, 1, // GPSE + GP11, 1, + GP12, 1, // WLED + GP13, 1, // BLED + GP14, 1, // GLED + GP15, 1, // GDIS + GP16, 1, GP17, 1, - GP18, 1, - GP19, 1, // SPCI - GP20, 1, // TSDT - GP21, 1, // SCPU + GP18, 1, // SPCI + GP19, 1, // TSDT + GP20, 1, // SCPU + GP21, 1, GP22, 1, - GP23, 1, - GP24, 1, // LANP - GP25, 1, // DKLR - GP26, 1, // WLAN - GP27, 1, // SATA_PWR_EN #0 / SPOF - GP28, 1, // SATA_PWR_EN #1 / SPMU + GP23, 1, // LANP + GP24, 1, // DKLR + GP25, 1, // WLAN + GP26, 1, // SATA_PWR_EN #0 / SPOF + GP27, 1, // SATA_PWR_EN #1 / SPMU + GP28, 1, GP29, 1, GP30, 1, GP31, 1,