summaryrefslogtreecommitdiff
path: root/src/soc
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2022-02-13 13:35:20 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-02-15 16:19:37 +0000
commitd85319a12d6bf4341c46bf83cd2f8ce1cc1ba3e0 (patch)
tree80f4b842236b9c7d084210393a9e66279d1f8d2f /src/soc
parentdfde9b125ccf0e044cec68cbaa7bd1a3fa8a8920 (diff)
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>
Diffstat (limited to 'src/soc')
-rw-r--r--src/soc/intel/common/block/pcie/rtd3/rtd3.c12
1 files 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. */