HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46099 )
Change subject: hp/kbc1126: Convert to ASL 2.0 syntax ......................................................................
hp/kbc1126: Convert to ASL 2.0 syntax
Change-Id: Ibee483bb3802f7fc1db86492e5838cc2ada6b472 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/ec/hp/kbc1126/acpi/ac.asl M src/ec/hp/kbc1126/acpi/battery.asl M src/ec/hp/kbc1126/acpi/ec.asl M src/ec/hp/kbc1126/acpi/lid.asl 4 files changed, 46 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/46099/1
diff --git a/src/ec/hp/kbc1126/acpi/ac.asl b/src/ec/hp/kbc1126/acpi/ac.asl index f9d346b..606bdb0 100644 --- a/src/ec/hp/kbc1126/acpi/ac.asl +++ b/src/ec/hp/kbc1126/acpi/ac.asl @@ -13,7 +13,7 @@ Method (UPAD, 0, Serialized) { Acquire (BTMX, 0xFFFF) - If ((GACP & 0x01)) + If (GACP & 0x01) { GACP &= 0x06 Release (BTMX) @@ -65,7 +65,7 @@
Method (_Q06, 0, NotSerialized) { - Store ("EC: AC STATUS", Debug) + Debug = "EC: AC STATUS" PWUP (0x05, (0x02 | 0x01)) If (BTDR (0x02)) { diff --git a/src/ec/hp/kbc1126/acpi/battery.asl b/src/ec/hp/kbc1126/acpi/battery.asl index 6669726..824da9c 100644 --- a/src/ec/hp/kbc1126/acpi/battery.asl +++ b/src/ec/hp/kbc1126/acpi/battery.asl @@ -42,9 +42,11 @@
Method (ITLB, 0, NotSerialized) { - Divide ((NLB1 + 0x09), 0x0A, Local0, Local1) - Divide ((0x96 + 0x09), 0x0A, Local0, Local2) - Local0 = Local0 + Local0 = (NLB1 + 0x09) % 10 + Local1 = (NLB1 + 0x09) / 10 + Local0 = (0x96 + 0x09) % 10 /* FIXME: meaning ?? */ + Local2 = (0x96 + 0x09) / 10 + Local0 = Local0 /* FIXME : Local0 = Local ?? */ LB1 = Local1 LB2 = Local2 } @@ -53,16 +55,16 @@ { Local0 = 0x00 Acquire (BTMX, 0xFFFF) - Local1 = (Arg0 | GACP) + Local1 = Arg0 | GACP GACP = (Local1 & 0x07) - If ((GACP & 0x02)) + If (GACP & 0x02) { NGBF |= Arg1 }
- If ((GACP & 0x04)) + If (GACP & 0x04) { - If ((NGBT != 0xFF)) + If (NGBT != 0xFF) { Local0 = 0x01 } @@ -77,7 +79,7 @@ Method (GBAP, 0, Serialized) { Acquire (BTMX, 0xFFFF) - If ((GACP & 0x02)) + If (GACP & 0x02) { GACP &= 0x05 Release (BTMX) @@ -94,11 +96,11 @@
Method (BTDR, 1, Serialized) { - If ((Arg0 == 0x01)) + If (Arg0 == 0x01) { NNBO = 0x01 } - ElseIf ((Arg0 == 0x00)) + ElseIf (Arg0 == 0x00) { NNBO = 0x00 } @@ -229,8 +231,9 @@ While (Local1) { Local1-- - Divide (Local0, 10, Local2, Local0) - Add (Local2, 48, Index (NUMB, Local1)) + Local2 = Local0 % 10 + Local0 /= 10 + NUMB [Local1] = Local2 + 48 } ToString (NUMB, Arg1, Local3) Return (Local3) @@ -258,9 +261,9 @@
Method (BTIG, 1, Serialized) /* in vendor DSDT is EC0.BTIF */ { - Local7 = (0x01 << Arg0) + Local7 = 0x01 << Arg0 BTDR (0x01) - If ((BSTA (Local7) == 0x0F)) + If (BSTA (Local7) == 0x0F) { Return (0xFF) } @@ -268,7 +271,7 @@ Acquire (BTMX, 0xFFFF) Local0 = NGBF Release (BTMX) - If (((Local0 & Local7) == 0x00)) + If ((Local0 & Local7) == 0x00) { Return (0x00) } @@ -304,7 +307,7 @@ Method (BTIF, 1, Serialized) /* in vendor DSDT is SB.BTIF */ { Local0 = BTIG (Arg0) - If ((Local0 == 0xFF)) + If (Local0 == 0xFF) { Return (Package (0x0D) { @@ -343,9 +346,9 @@
Method (BTST, 2, Serialized) { - Local7 = (0x01 << Arg0) + Local7 = 0x01 << Arg0 BTDR (0x01) - If ((BSTA (Local7) == 0x0F)) + If (BSTA (Local7) == 0x0F) { NBST [Arg0] = Package (0x04) { @@ -365,7 +368,7 @@
Local0 = NGBT /* _SB_.PCI0.LPCB.EC0_.NGBT */ Release (BTMX) - If (((Local0 & Local7) == 0x00)) + If ((Local0 & Local7) == 0x00) { Return (0x00) } @@ -378,7 +381,7 @@ DerefOf (NBST [Arg0]) [0x03] = BPV Release (ECMX)
- If ((GACS () == 0x01)) + If (GACS () == 0x01) { Local0 &= ~0x01 } @@ -387,7 +390,7 @@ Local0 &= ~0x02 }
- If ((Local0 & 0x01)) + If (Local0 & 0x01) { Acquire (BTMX, 0xFFFF) NDCB = Local7 @@ -395,14 +398,14 @@ }
DerefOf (NBST [Arg0]) [0x00] = Local0 - If ((Local0 & 0x01)) + If (Local0 & 0x01) { - If (((Local3 < 0x0190) || (Local3 > 0x1964))) + If ((Local3 < 0x0190) || (Local3 > 0x1964)) { Local5 = DerefOf (DerefOf (NBST [Arg0]) [0x01]) - If (((Local5 < 0x0190) || (Local5 > 0x1964))) + If ((Local5 < 0x0190) || (Local5 > 0x1964)) { - Local3 = (0x1AF4 / 0x02) + Local3 = 0x1AF4 / 0x02 } Else { @@ -410,7 +413,7 @@ } } } - ElseIf (((Local0 & 0x02) == 0x00)) + ElseIf ((Local0 & 0x02) == 0x00) { Local3 = 0x00 } @@ -424,12 +427,12 @@
Method (SBTN, 2, Serialized) { - If ((Arg0 & 0x01)) + If (Arg0 & 0x01) { Notify (BAT0, Arg1) }
- If ((Arg0 & 0x02)) + If (Arg0 & 0x02) { Notify (BAT1, Arg1) } @@ -437,7 +440,7 @@
Method (_Q03, 0, NotSerialized) { - Store ("EC: _Q03", Debug) + Debug = "EC: _Q03" Acquire (BTMX, 0xFFFF) Local0 = NDCB Release (BTMX) @@ -447,10 +450,10 @@
Method (_Q08, 0, NotSerialized) { - Store ("EC: PRIMARY BATTERY ATTACHED/DETACHED", Debug) + Debug = "EC: PRIMARY BATTERY ATTACHED/DETACHED" PWUP (0x06, 0x01) Local0 = GBAP () - If ((Local0 != 0x02)) + If (Local0 != 0x02) { PWUP (0x04, 0x02) If (BTDR (0x02)) @@ -467,7 +470,7 @@
Method (_Q09, 0, NotSerialized) { - Store ("EC: PRIMARY BATTERY STATUS", Debug) + Debug = "EC: PRIMARY BATTERY STATUS" PWUP (0x04, 0x01) If (BTDR (0x02)) { @@ -477,10 +480,10 @@
Method (_Q18, 0, NotSerialized) { - Store("EC: SECONDARY BATTERY ATTACHED/DETACHED", Debug) + Debug = "EC: SECONDARY BATTERY ATTACHED/DETACHED" PWUP (0x06, 0x02) Local0 = GBAP () - If ((Local0 != 0x01)) + If (Local0 != 0x01) { PWUP (0x04, 0x01) If (BTDR (0x02)) @@ -497,7 +500,7 @@
Method (_Q19, 0, NotSerialized) { - Store ("EC: SECONDARY BATTERY STATUS", Debug) + Debug = "EC: SECONDARY BATTERY STATUS" PWUP (0x04, 0x02) If (BTDR (0x02)) { diff --git a/src/ec/hp/kbc1126/acpi/ec.asl b/src/ec/hp/kbc1126/acpi/ec.asl index e5752a8..98c3cc6 100644 --- a/src/ec/hp/kbc1126/acpi/ec.asl +++ b/src/ec/hp/kbc1126/acpi/ec.asl @@ -202,27 +202,27 @@
Method (_Q04, 0, NotSerialized) { - Store ("EC: _Q04", Debug) + Debug = "EC: _Q04" PNOT() }
Method (_Q05, 0, NotSerialized) { - Store ("EC: _Q05", Debug) + Debug = "EC: _Q05" }
Method (_Q0B, 0, NotSerialized) { - Store ("EC: _Q0B", Debug) + Debug = "EC: _Q0B" }
Method (_Q0C, 0, NotSerialized) { - Store ("EC: _Q0C", Debug) + Debug = "EC: _Q0C" }
Method (_Q0D, 0, NotSerialized) { - Store ("EC: _Q0D", Debug) + Debug = "EC: _Q0D" } } diff --git a/src/ec/hp/kbc1126/acpi/lid.asl b/src/ec/hp/kbc1126/acpi/lid.asl index 2494168..05c016e 100644 --- a/src/ec/hp/kbc1126/acpi/lid.asl +++ b/src/ec/hp/kbc1126/acpi/lid.asl @@ -12,6 +12,6 @@
Method (_Q0A, 0, NotSerialized) { - Store ("EC: LID STATUS", Debug) + Debug = "EC: LID STATUS" Notify (LID, 0x80) }
HAOUAS Elyes has uploaded a new patch set (#2). ( https://review.coreboot.org/c/coreboot/+/46099 )
Change subject: ec/hp/kbc1126: Convert to ASL 2.0 syntax ......................................................................
ec/hp/kbc1126: Convert to ASL 2.0 syntax
Change-Id: Ibee483bb3802f7fc1db86492e5838cc2ada6b472 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/ec/hp/kbc1126/acpi/ac.asl M src/ec/hp/kbc1126/acpi/battery.asl M src/ec/hp/kbc1126/acpi/ec.asl M src/ec/hp/kbc1126/acpi/lid.asl 4 files changed, 46 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/46099/2
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46099
to look at the new patch set (#4).
Change subject: ec/hp/kbc1126: Convert to ASL 2.0 syntax ......................................................................
ec/hp/kbc1126: Convert to ASL 2.0 syntax
Change-Id: Ibee483bb3802f7fc1db86492e5838cc2ada6b472 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/ec/hp/kbc1126/acpi/ac.asl M src/ec/hp/kbc1126/acpi/battery.asl M src/ec/hp/kbc1126/acpi/ec.asl M src/ec/hp/kbc1126/acpi/lid.asl 4 files changed, 46 insertions(+), 43 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/99/46099/4