HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46079 )
Change subject: mb/google: Convert to ASL 2.0 syntax ......................................................................
mb/google: Convert to ASL 2.0 syntax
Change-Id: Ib8020ccc204ae7d3145cdc2aa5d64207f783e088 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/mainboard/google/auron/variants/buddy/include/variant/acpi/mainboard.asl M src/mainboard/google/cyan/variants/terra/include/variant/acpi/charger.asl M src/mainboard/google/cyan/variants/terra/include/variant/acpi/cpu.asl M src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera_pmic.asl M src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl M src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl M src/mainboard/google/slippy/acpi/platform.asl M src/mainboard/google/volteer/variants/baseboard/include/baseboard/acpi/mipi_camera.asl 8 files changed, 92 insertions(+), 95 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/79/46079/1
diff --git a/src/mainboard/google/auron/variants/buddy/include/variant/acpi/mainboard.asl b/src/mainboard/google/auron/variants/buddy/include/variant/acpi/mainboard.asl index b3dc42c..bb30c2e 100644 --- a/src/mainboard/google/auron/variants/buddy/include/variant/acpi/mainboard.asl +++ b/src/mainboard/google/auron/variants/buddy/include/variant/acpi/mainboard.asl @@ -24,7 +24,7 @@
Method (_STA) { - If (LEqual (\S1EN, 1)) { + If (\S1EN == 1) { Return (0xF) } Else { Return (0x0) @@ -59,7 +59,7 @@
Method (_STA) { - If (LEqual (\S2EN, 1)) { + If (\S2EN == 1) { Return (0xF) } Else { Return (0x0) @@ -70,8 +70,8 @@
Method (_DSW, 3, NotSerialized) { - Store (BOARD_TOUCHSCREEN_WAKE_GPIO, Local0) - If (LEqual (Arg0, 1)) { + Local0 = BOARD_TOUCHSCREEN_WAKE_GPIO + If (Arg0 == 1) { // Enable GPIO as wake source _SB.PCI0.LPCB.GPIO.GWAK (Local0) } @@ -94,9 +94,9 @@
Method (_DSW, 3, NotSerialized) { - Store (BUDDY_NIC_WAKE_GPIO, Local0) + Local0 = BUDDY_NIC_WAKE_GPIO
- If (LEqual (Arg0, 1)) { + If (Arg0 == 1) { // Enable GPIO as wake source _SB.PCI0.LPCB.GPIO.GWAK (Local0) } 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..6957e92 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 { diff --git a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera_pmic.asl b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera_pmic.asl index 5ad10ef..eb31c42 100644 --- a/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera_pmic.asl +++ b/src/mainboard/google/poppy/variants/baseboard/include/baseboard/acpi/camera_pmic.asl @@ -25,7 +25,7 @@
Method (PMOF, 0, Serialized) { /* Make Sure all PMIC outputs are off. */ - If (LEqual (VSIC, Zero)) { + If (VSIC == 0) { CTXS(EN_PP3300_DX_CAM) } } @@ -39,7 +39,7 @@ Method (_ON, 0, Serialized) { PMON() /* Do not reset PMIC across S3 and S0ix cycle */ - if (Lequal (RSTO, 1)) { + if (RSTO == 1) { CTXS(EN_CAM_PMIC_RST_L) Sleep(1) STXS(EN_CAM_PMIC_RST_L) @@ -64,46 +64,45 @@ Name (AVB3, Zero) Method (_REG, 2, NotSerialized) { - If (LEqual (Arg0, 0x08)) + If (Arg0 == 0x08) { /* Marks the availability of GeneralPurposeIO * 0x08: opregion space for GeneralPurposeIO */ - Store (Arg1, AVGP) + AVGP = Arg1 } - If (LEqual (Arg0, 0xB0)) + If (Arg0 == 0xB0) { /* Marks the availability of * TI_PMIC_POWER_OPREGION_ID */ - Store (Arg1, AVB0) + AVB0 = Arg1 } - If (LEqual (Arg0, 0xB1)) + If (Arg0 == 0xB1) { /* Marks the availability of * TI_PMIC_VR_VAL_OPREGION_ID */ - Store (Arg1, AVB1) + AVB1 = Arg1 } - If (LEqual (Arg0, 0xB2)) + If (Arg0 == 0xB2) { /* Marks the availability of * TI_PMIC_CLK_OPREGION_ID */ - Store (Arg1, AVB2) + AVB2 = Arg1 } - If (LEqual (Arg0, 0xB3)) + If (Arg0 == 0xB3) { /* Marks the availability of * TI_PMIC_CLK_FREQ_OPREGION_ID */ - Store (Arg1, AVB3) + AVB3 = Arg1 } - If (LAnd (AVGP, LAnd (LAnd (AVB0, AVB1), - LAnd(AVB2, AVB3)))) + If (AVGP & ((AVB0 & AVB1) & (AVB2 & AVB3))) { /* Marks the availability of all opregions */ - Store (1, AVBL) + AVBL = 1 } Else { - Store (0, AVBL) + AVBL = 0 } }
@@ -321,12 +320,12 @@ Method (CLKE, 0, Serialized) { /* save Acquire result so we can check for Mutex acquired */ - Store (Acquire (MUTC, 1000), Local0) + Local0 = Acquire (MUTC, 1000) /* check for Mutex acquired */ - If (LEqual (Local0, Zero)) { + If (Local0 == 0) { /* Enable clocks only when a sensor is turned on and both the clocks are disabled */ - If (LNot (LOr (CLE0, CLE1))) { + If (!(CLE0 |CLE1)) { /* Set boost clock divider */ BODI = 3 /* Set buck clock divider */ @@ -365,10 +364,10 @@ Method (CLKD, 0, Serialized) { /* save Acquire result so we can check for Mutex acquired */ - Store (Acquire (MUTC, 1000), Local0) + Local0 = Acquire (MUTC, 1000) /* check for Mutex acquired */ - If (LEqual (Local0, Zero)) { - If (LNot (LOr (CLE0, CLE1))) { + If (Local0 == 0) { + If (!(CLE0 |CLE1)) { BODI = 0 BUDI = 0 PSWR = 0 @@ -390,37 +389,37 @@ Name (VSIC, 0) Method (DOVD, 1, Serialized) { /* Turn off VSIO */ - If (LEqual (Arg0, Zero)) { + If (Arg0 == 0) { /* Decrement only if VSIC > 0 */ - if (LGreater (VSIC, 0)) { - Decrement (VSIC) - If (LEqual (VSIC, Zero)) { + if (VSIC > 0) { + VSIC-- + If (VSIC == 0) { VSIO = 0 Sleep(1) PMOF() } } - } ElseIf (LEqual (Arg0, 1)) { + } ElseIf (Arg0 == 1) { /* Increment only if VSIC < 4 */ - If (LLess (VSIC, 4)) { + If (VSIC < 4) { /* Turn on VSIO */ - If (LEqual (VSIC, Zero)) { + If (VSIC == 0) { PMON() VSIO = 3
- if (LNotEqual (IOVA, 52)) { + if (IOVA != 52) { /* Set VSIO value as 1.8006 V */ IOVA = 52 } - if (LNotEqual (SIOV, 52)) { + if (SIOV != 52) { /* Set VSIO value as 1.8006 V */ SIOV = 52 } Sleep(3) } - Increment (VSIC) + VSIC++ } } } @@ -430,8 +429,8 @@ Name (STA, 0) Method (_ON, 0, Serialized) { /* TODO: Read Voltage and Sleep values from Sensor Obj */ - If (LEqual (AVBL, 1)) { - If (LEqual (STA, 0)) { + If (AVBL == 1) { + If (STA == 0) { /* Enable VSIO regulator + daisy chain */ DOVD(1) @@ -470,8 +469,8 @@ }
Method (_OFF, 0, Serialized) { - If (LEqual (AVBL, 1)) { - If (LEqual (STA, 1)) { + If (AVBL == 1) { + If ((STA == 1) { Sleep(2) CLE0 = 0 _SB.PCI0.I2C2.PMIC.CLKD() @@ -497,8 +496,8 @@ Name (STA, 0) Method (_ON, 0, Serialized) { /* TODO: Read Voltage and Sleep values from Sensor Obj */ - If (LEqual (AVBL, 1)) { - If (LEqual (STA, 0)) { + If (AVBL == 1) { + If (STA == 0) { /* Enable VSIO regulator + daisy chain */ DOVD(1) @@ -537,8 +536,8 @@ }
Method (_OFF, 0, Serialized) { - If (LEqual (AVBL, 1)) { - If (LEqual (STA, 1)) { + If (AVBL == 1) { + If ((STA == 1) { Sleep(2) CLE1 = 0 _SB.PCI0.I2C2.PMIC.CLKD() @@ -566,8 +565,8 @@ PowerResource (VCMP, 0, 0) { Name (STA, 0) Method (_ON, 0, Serialized) { - If (LEqual (AVBL, 1)) { - If (LEqual (STA, 0)) { + If (AVBL == 1) { + If (STA == 0) { /* Enable VSIO regulator + daisy chain */ DOVD(1) @@ -584,8 +583,8 @@ }
Method (_OFF, 0, Serialized) { - If (LEqual (AVBL, 1)) { - If (LEqual (STA, 1)) { + If (AVBL == 1) { + If ((STA == 1) { VCMC = 0 /* Disable regulator */ Sleep(1) DOVD(0) /* Disable regulator */ @@ -603,8 +602,8 @@ PowerResource (NVMP, 0, 0) { Name (STA, 0) Method (_ON, 0, Serialized) { - If (LEqual (AVBL, 1)) { - If (LEqual (STA, 0)) { + If (AVBL == 1) { + If (STA == 0) { /* Enable VSIO regulator + daisy chain */ DOVD(1) @@ -614,8 +613,8 @@ }
Method (_OFF, 0, Serialized) { - If (LEqual (AVBL, 1)) { - If (LEqual (STA, 1)) { + If (AVBL == 1) { + If ((STA == 1) { DOVD(0) /* Disable regulator */ STA = 0 } diff --git a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl index 17fb82b..c3449a7 100644 --- a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl +++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam0.asl @@ -6,7 +6,7 @@ { Name (STA, 0) Method (_ON, 0, Serialized) { - If (LEqual(STA, 0)) { + If (STA == 0) { CTXS (GPIO_FCAM_RST_L) STXS (GPIO_FCAM_PWR_EN) STXS (GPIO_PCH_FCAM_CLK_EN) @@ -22,15 +22,15 @@ * sequence completes */ Sleep (11) - Store (1, STA) + STA = 1 } } Method (_OFF, 0, Serialized) { - If (LEqual(STA, 1)) { + If (STA == 1) { CTXS (GPIO_PCH_FCAM_CLK_EN) CTXS (GPIO_FCAM_RST_L) CTXS (GPIO_FCAM_PWR_EN) - Store (0, STA) + STA = 0 } } Method (_STA, 0, NotSerialized) { diff --git a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl index a934901..0e31eee 100644 --- a/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl +++ b/src/mainboard/google/poppy/variants/nocturne/include/variant/acpi/cam1.asl @@ -6,7 +6,7 @@ { Name (STA, 0) Method (_ON, 0, Serialized) { - If (LEqual(STA, 0)) { + If (STA == 0) { CTXS (GPIO_RCAM_RST_L) STXS (GPIO_RCAM_PWR_EN) STXS (GPIO_PCH_RCAM_CLK_EN) @@ -21,15 +21,15 @@ * on sequence completes */ Sleep (12) - Store (1, STA) + STA = 1 } } Method (_OFF, 0, Serialized) { - If (LEqual(STA, 1)) { + If (STA == 1) { CTXS (GPIO_PCH_RCAM_CLK_EN) CTXS (GPIO_RCAM_RST_L) CTXS (GPIO_RCAM_PWR_EN) - Store (0, STA) + STA = 0 } } Method (_STA, 0, NotSerialized) { diff --git a/src/mainboard/google/slippy/acpi/platform.asl b/src/mainboard/google/slippy/acpi/platform.asl index 2813078..c98fc6e 100644 --- a/src/mainboard/google/slippy/acpi/platform.asl +++ b/src/mainboard/google/slippy/acpi/platform.asl @@ -15,16 +15,16 @@ Method(_WAK,1) { /* Update AC status */ - Store (_SB.PCI0.LPCB.EC0.ACEX, Local0) - if (LNotEqual (Local0, \PWRS)) { - Store (Local0, \PWRS) + Local0 = _SB.PCI0.LPCB.EC0.ACEX + if (Local0 != \PWRS) { + \PWRS = Local0 Notify (_SB.PCI0.LPCB.EC0.AC, 0x80) }
/* Update LID status */ - Store (_SB.PCI0.LPCB.EC0.LIDS, Local0) - if (LNotEqual (Local0, \LIDS)) { - Store (Local0, \LIDS) + Local0 = _SB.PCI0.LPCB.EC0.LIDS + if (Local0 != \LIDS) { + \LIDS = Local0 Notify (_SB.PCI0.LPCB.EC0.LID0, 0x80) }
diff --git a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/acpi/mipi_camera.asl b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/acpi/mipi_camera.asl index 51034c3..91f4e8f 100644 --- a/src/mainboard/google/volteer/variants/baseboard/include/baseboard/acpi/mipi_camera.asl +++ b/src/mainboard/google/volteer/variants/baseboard/include/baseboard/acpi/mipi_camera.asl @@ -178,12 +178,12 @@ #endif Sleep(1) /* t2 */
- Store(1,STA) + STA = 1 } } Method (_OFF, 0, Serialized) /* Rear camera _OFF: Power Off */ { - If ((STA == One)) + If (STA == 1) { /* Disable IMG_CLK */ Sleep(1) /* t0+t1 */ @@ -202,7 +202,7 @@ /* Pull SNRPWR_EN low */ CTXS(GPP_H14)
- Store(0,STA) + STA = 0 } } Method (_STA, 0, NotSerialized) /* _STA: Status */ @@ -479,12 +479,12 @@ STXS(GPP_D4) Sleep(1) /* t2 */
- Store(1,STA) + STA = 1 } } Method (_OFF, 0, Serialized) /* Front camera_OFF_: Power Off */ { - If ((STA == One)) + If (STA == 1) { /* Disable IMG_CLK */ Sleep(1) /* t0+t1 */ @@ -499,7 +499,7 @@ /* Pull SNRPWR_EN low */ CTXS(GPP_D18)
- Store(0,STA) + STA = 0 } } Method (_STA, 0, NotSerialized) /* _STA: Status */