HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/50320 )
Change subject: mb/cyan/variants/terra/include/variant/acpi: Convert to ASL 2.0 ......................................................................
mb/cyan/variants/terra/include/variant/acpi: Convert to ASL 2.0
Change-Id: Ice6158943c61b3e2156a2ebbf96aa73e7cf87a7e Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/mainboard/google/cyan/variants/terra/include/variant/acpi/charger.asl M src/mainboard/google/cyan/variants/terra/include/variant/acpi/cpu.asl 2 files changed, 19 insertions(+), 21 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/20/50320/1
diff --git a/src/mainboard/google/cyan/variants/terra/include/variant/acpi/charger.asl b/src/mainboard/google/cyan/variants/terra/include/variant/acpi/charger.asl index 98e7b7d..601ca84 100644 --- a/src/mainboard/google/cyan/variants/terra/include/variant/acpi/charger.asl +++ b/src/mainboard/google/cyan/variants/terra/include/variant/acpi/charger.asl @@ -9,7 +9,7 @@
Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -19,7 +19,7 @@ /* Return charger performance states defined by Terra2 or Terra3 mainboard */ Method (PPSS) { - If (LEqual (_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { Return (_SB.CPT2) } Else { @@ -31,17 +31,17 @@ Method (PPPC) { /* Convert size of PPSS table to index */ - If (LEqual (_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { - Store (SizeOf (_SB.CPT2), Local0) + Local0 = SizeOf (_SB.CPT2) } Else { - Store (SizeOf (_SB.CPT3), Local0) + Local0 = SizeOf (_SB.CPT3) }
- Decrement (Local0) + Local0--
/* Check if charging is disabled (AC removed) */ - If (LEqual (_SB.PCI0.LPCB.EC0.ACEX, Zero)) { + If (_SB.PCI0.LPCB.EC0.ACEX == 0) { /* Return last power state */ Return (Local0) } Else { @@ -57,13 +57,11 @@ { /* Retrieve Control (index 4) for specified PPSS level */ /* Convert size of PPSS table to index */ - If (LEqual (_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { - Store (DeRefOf (Index (DeRefOf (Index - (_SB.CPT2, ToInteger (Arg0))), 4)), Local0) + Local0 = DeRefOf (DeRefOf (_SB.CPT2 [ToInteger (Arg0)])[4]) } Else { - Store (DeRefOf (Index (DeRefOf (Index - (_SB.CPT3, ToInteger (Arg0))), 4)), Local0) + Local0 = DeRefOf (DeRefOf (_SB.CPT3 [ToInteger (Arg0)])[4]) }
/* Pass Control value to EC to limit charging */ diff --git a/src/mainboard/google/cyan/variants/terra/include/variant/acpi/cpu.asl b/src/mainboard/google/cyan/variants/terra/include/variant/acpi/cpu.asl index 7ec48a3..ec02670 100644 --- a/src/mainboard/google/cyan/variants/terra/include/variant/acpi/cpu.asl +++ b/src/mainboard/google/cyan/variants/terra/include/variant/acpi/cpu.asl @@ -40,7 +40,7 @@
Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -100,8 +100,8 @@ Method (_TDL) { If (CondRefOf (_SB.CP00._TSS)) { - Store (SizeOf (_SB.CP00._TSS ()), Local0) - Decrement (Local0) + Local0 = SizeOf (_SB.CP00._TSS ()) + Local0-- Return (Local0) } Else { Return (0) @@ -119,7 +119,7 @@
Method (SPPC, 1) { - Store (Arg0, \PPCM) + \PPCM = Arg0
/* Notify OS to re-read _PPC limit on each CPU */ \PPCN () @@ -143,8 +143,8 @@ If (CondRefOf (_SB.MPDL)) { Return (_SB.MPDL) } ElseIf (CondRefOf (_SB.CP00._PSS)) { - Store (SizeOf (_SB.CP00._PSS ()), Local0) - Decrement (Local0) + Local0 = SizeOf (_SB.CP00._PSS ()) + Local0-- Return (Local0) } Else { Return (0) @@ -154,7 +154,7 @@ /* Return PPCC table defined by Terra2 or Terra3 mainboard */ Method (PPCC) { - If (LEqual (_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { Return (_SB.PPT2) } Else { @@ -165,7 +165,7 @@ /* Return critical thermal point defined by Terra2 or Terra3 mainboard */ Method (_CRT) { - If (Lequal(_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { Return (_SB.DPTF.CTOK(DPTF_TERRA2_CPU_CRITICAL)) } Else { @@ -176,7 +176,7 @@ /* Return passive thermal point defined by Terra2 or Terra3 mainboard */ Method (_PSV) { - If (Lequal(_SB.GPID, TERRA2_PROJECT_ID)) + If (_SB.GPID == TERRA2_PROJECT_ID) { Return (_SB.DPTF.CTOK(DPTF_TERRA2_CPU_PASSIVE)) } Else {