From a590852313359d31ae1cfb0093daf4fe3610262a Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Mon, 19 Apr 2021 20:43:17 +0200 Subject: [PATCH] soc/intel/broadwell/pch/acpi: Fix LPD0 and LPD3 methods When using references to a FieldUnit, DeRefOf is not used when storing a value into the referenced FieldUnit, only when reading its value. Tested on out-of-tree Compal LA-A992P, Linux 5.11.15-arch1-2 no longer spews errors like these in dmesg: ACPI Error: Needed type [Reference], found [Integer] 000000006cbcc5d8 (20201113/exresop-66) ACPI Error: AE_AML_OPERAND_TYPE, While resolving operands for [And] (20201113/dswexec-431) ACPI Error: Aborting method \_SB.PCI0.LPD0 due to previous error (AE_AML_OPERAND_TYPE) (20201113/psparse-529) ACPI Error: Aborting method \_SB.PCI0.I2C0._PS0 due to previous error (AE_AML_OPERAND_TYPE) (20201113/psparse-529) Change-Id: I60c40452f8b5bdbec76264b578957396de8676ea Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/52519 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Matt DeVillier --- src/soc/intel/broadwell/pch/acpi/serialio.asl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/soc/intel/broadwell/pch/acpi/serialio.asl b/src/soc/intel/broadwell/pch/acpi/serialio.asl index 2bacd2b0a3..183bca6d55 100644 --- a/src/soc/intel/broadwell/pch/acpi/serialio.asl +++ b/src/soc/intel/broadwell/pch/acpi/serialio.asl @@ -9,7 +9,7 @@ // Arg0 - Ref to offset 0x84 of device's PCI config space Method (LPD0, 1, Serialized) { - DeRefOf (Arg0) &= 0xFFFFFFFC + Arg0 = DeRefOf (Arg0) & 0xFFFFFFFC Local0 = DeRefOf (Arg0) // Read back after writing // Use Local0 to avoid iasl warning: Method Local is set but never used @@ -20,7 +20,7 @@ Method (LPD0, 1, Serialized) // Arg0 - Ref to offset 0x84 of device's PCI config space Method (LPD3, 1, Serialized) { - DeRefOf (Arg0) |= 0x3 + Arg0 = DeRefOf (Arg0) | 0x3 Local0 = DeRefOf (Arg0) // Read back after writing // Use Local0 to avoid iasl warning: Method Local is set but never used