HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46221 )
Change subject: mb/google/poppy: Convert to ASL 2.0 syntax ......................................................................
mb/google/poppy: Convert to ASL 2.0 syntax
Change-Id: I4f8b77b3f196ca51346bb7932a40875c4dd5d2a6 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- 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 3 files changed, 55 insertions(+), 56 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/46221/1
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..374c0aa 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) {