From d85319a12d6bf4341c46bf83cd2f8ce1cc1ba3e0 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sun, 13 Feb 2022 13:35:20 +0100 Subject: soc/intel/common/block/pcie/rtd3: Fix bit checks Fix always-true conditions to properly test whether a bit is set. Change-Id: Ibfeafe222c0c2b39ced5b77f79ceb0c679a471b5 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/61898 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/soc/intel/common/block/pcie/rtd3/rtd3.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/soc/intel/common/block/pcie/rtd3/rtd3.c b/src/soc/intel/common/block/pcie/rtd3/rtd3.c index 8a9b068976..f99ae44650 100644 --- a/src/soc/intel/common/block/pcie/rtd3/rtd3.c +++ b/src/soc/intel/common/block/pcie/rtd3/rtd3.c @@ -375,19 +375,19 @@ static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev) return; } if (config->disable_l23) { - if (config->ext_pm_support | ACPI_PCIE_RP_EMIT_L23) { + if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_L23) { printk(BIOS_ERR, "%s: Can not export L23 methods\n", __func__); return; } } if (rp_type != PCIE_RP_PCH) { - if (config->ext_pm_support | ACPI_PCIE_RP_EMIT_PSD0) { + if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_PSD0) { printk(BIOS_ERR, "%s: Can not export PSD0 method\n", __func__); return; } } if (config->srcclk_pin == 0) { - if (config->ext_pm_support | ACPI_PCIE_RP_EMIT_SRCK) { + if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_SRCK) { printk(BIOS_ERR, "%s: Can not export SRCK method\n", __func__); return; } @@ -415,7 +415,7 @@ static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev) acpigen_write_field("PXCS", fieldlist, ARRAY_SIZE(fieldlist), FIELD_ANYACC | FIELD_NOLOCK | FIELD_PRESERVE); - if (config->ext_pm_support | ACPI_PCIE_RP_EMIT_L23) { + if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_L23) { pcie_rtd3_acpi_method_dl23(); pcie_rtd3_acpi_method_l23d(); } @@ -424,10 +424,10 @@ static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev) if (rp_type == PCIE_RP_PCH) write_modphy_opregion(pcie_rp); - if (config->ext_pm_support | ACPI_PCIE_RP_EMIT_PSD0) + if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_PSD0) pcie_rtd3_acpi_method_pds0(pcie_rp); - if (config->ext_pm_support | ACPI_PCIE_RP_EMIT_SRCK) + if (config->ext_pm_support & ACPI_PCIE_RP_EMIT_SRCK) pcie_rtd3_acpi_method_srck(pcie_rp, config); /* ACPI Power Resource for controlling the attached device power. */ -- cgit v1.2.3