diff options
author | Elyes HAOUAS <ehaouas@noos.fr> | 2021-02-05 19:57:01 +0100 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2021-02-09 07:47:16 +0000 |
commit | e7fc29740b01a52d199dd7798111e48b53f41af8 (patch) | |
tree | 9c94c9b763040447254d3817443c915b2cd412b2 /src | |
parent | a24efbcb96557e929993e6279eb444c11f2e2533 (diff) |
mb/google/cyan/var/terra: Convert to ASL 2.0
Change-Id: Ice6158943c61b3e2156a2ebbf96aa73e7cf87a7e
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50320
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/cyan/variants/terra/include/variant/acpi/charger.asl | 22 | ||||
-rw-r--r-- | src/mainboard/google/cyan/variants/terra/include/variant/acpi/cpu.asl | 18 |
2 files changed, 19 insertions, 21 deletions
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 98e7b7d097..601ca847af 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 @@ Device (TCHG) Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -19,7 +19,7 @@ Device (TCHG) /* 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 @@ Device (TCHG) 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 @@ Device (TCHG) { /* 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 7ec48a3a21..ec02670118 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 @@ Device (B0DB) Method (_STA) { - If (LEqual (\DPTE, One)) { + If (\DPTE == 1) { Return (0xF) } Else { Return (0x0) @@ -100,8 +100,8 @@ Device (B0DB) 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 @@ Device (B0DB) Method (SPPC, 1) { - Store (Arg0, \PPCM) + \PPCM = Arg0 /* Notify OS to re-read _PPC limit on each CPU */ \PPCN () @@ -143,8 +143,8 @@ Device (B0DB) 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 @@ Device (B0DB) /* 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 @@ Device (B0DB) /* 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 @@ Device (B0DB) /* 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 { |