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 <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/52519 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
parent
5d13e7fdcd
commit
a590852313
|
@ -9,7 +9,7 @@
|
||||||
// Arg0 - Ref to offset 0x84 of device's PCI config space
|
// Arg0 - Ref to offset 0x84 of device's PCI config space
|
||||||
Method (LPD0, 1, Serialized)
|
Method (LPD0, 1, Serialized)
|
||||||
{
|
{
|
||||||
DeRefOf (Arg0) &= 0xFFFFFFFC
|
Arg0 = DeRefOf (Arg0) & 0xFFFFFFFC
|
||||||
Local0 = DeRefOf (Arg0) // Read back after writing
|
Local0 = DeRefOf (Arg0) // Read back after writing
|
||||||
|
|
||||||
// Use Local0 to avoid iasl warning: Method Local is set but never used
|
// 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
|
// Arg0 - Ref to offset 0x84 of device's PCI config space
|
||||||
Method (LPD3, 1, Serialized)
|
Method (LPD3, 1, Serialized)
|
||||||
{
|
{
|
||||||
DeRefOf (Arg0) |= 0x3
|
Arg0 = DeRefOf (Arg0) | 0x3
|
||||||
Local0 = DeRefOf (Arg0) // Read back after writing
|
Local0 = DeRefOf (Arg0) // Read back after writing
|
||||||
|
|
||||||
// Use Local0 to avoid iasl warning: Method Local is set but never used
|
// Use Local0 to avoid iasl warning: Method Local is set but never used
|
||||||
|
|
Loading…
Reference in New Issue