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 <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61898
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
Angel Pons 2022-02-13 13:35:20 +01:00 committed by Felix Held
parent dfde9b125c
commit d85319a12d
1 changed files with 6 additions and 6 deletions

View File

@ -375,19 +375,19 @@ static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev)
return; return;
} }
if (config->disable_l23) { 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__); printk(BIOS_ERR, "%s: Can not export L23 methods\n", __func__);
return; return;
} }
} }
if (rp_type != PCIE_RP_PCH) { 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__); printk(BIOS_ERR, "%s: Can not export PSD0 method\n", __func__);
return; return;
} }
} }
if (config->srcclk_pin == 0) { 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__); printk(BIOS_ERR, "%s: Can not export SRCK method\n", __func__);
return; return;
} }
@ -415,7 +415,7 @@ static void pcie_rtd3_acpi_fill_ssdt(const struct device *dev)
acpigen_write_field("PXCS", fieldlist, ARRAY_SIZE(fieldlist), acpigen_write_field("PXCS", fieldlist, ARRAY_SIZE(fieldlist),
FIELD_ANYACC | FIELD_NOLOCK | FIELD_PRESERVE); 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_dl23();
pcie_rtd3_acpi_method_l23d(); 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) if (rp_type == PCIE_RP_PCH)
write_modphy_opregion(pcie_rp); 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); 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); pcie_rtd3_acpi_method_srck(pcie_rp, config);
/* ACPI Power Resource for controlling the attached device power. */ /* ACPI Power Resource for controlling the attached device power. */