summaryrefslogtreecommitdiff
path: root/src/drivers/wwan
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2022-02-13 13:37:04 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-02-15 16:19:57 +0000
commit92d449902e309b960c539e2f147b157980d50b3a (patch)
tree02f83d970f80c52985035eda19080d981a1cc940 /src/drivers/wwan
parentd85319a12d6bf4341c46bf83cd2f8ce1cc1ba3e0 (diff)
drivers/wwan/fm/acpi_fm350gl.c: Fix bit checks
Fix always-true conditions to properly test whether a bit is set. Change-Id: I54b5dbfdbb99a47ef0dfdb9497179f516d6e1f23 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/61899 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Cliff Huang <cliff.huang@intel.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/drivers/wwan')
-rw-r--r--src/drivers/wwan/fm/acpi_fm350gl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/drivers/wwan/fm/acpi_fm350gl.c b/src/drivers/wwan/fm/acpi_fm350gl.c
index 15d0ecc859..67bd4a14e6 100644
--- a/src/drivers/wwan/fm/acpi_fm350gl.c
+++ b/src/drivers/wwan/fm/acpi_fm350gl.c
@@ -60,7 +60,7 @@ static void wwan_fm350gl_acpi_method_fhrf(const struct device *parent_dev,
acpigen_get_tx_gpio(&config->perst_gpio);
acpigen_write_if_lequal_op_int(LOCAL0_OP, 0);
{
- if (wwan_fm350gl_get_rtd3_method_support(config) |
+ if (wwan_fm350gl_get_rtd3_method_support(config) &
ACPI_PCIE_RP_EMIT_L23) {
acpigen_emit_namestring(acpi_device_path_join(parent_dev,
"DL23"));
@@ -83,7 +83,7 @@ static void wwan_fm350gl_acpi_method_fhrf(const struct device *parent_dev,
acpigen_write_if_lequal_op_int(ARG0_OP, RESET_TYPE_COLD);
{
/* disable source clock */
- if (wwan_fm350gl_get_rtd3_method_support(config) |
+ if (wwan_fm350gl_get_rtd3_method_support(config) &
ACPI_PCIE_RP_EMIT_SRCK) {
acpigen_emit_namestring(acpi_device_path_join(
parent_dev, "SRCK"));
@@ -110,13 +110,13 @@ static void wwan_fm350gl_acpi_method_shrf(const struct device *parent_dev,
acpigen_write_method_serialized("SHRF", 0);
{
/* call rtd3 method to Disable ModPHY Power Gating. */
- if (wwan_fm350gl_get_rtd3_method_support(config) |
+ if (wwan_fm350gl_get_rtd3_method_support(config) &
ACPI_PCIE_RP_EMIT_PSD0) {
acpigen_emit_namestring(acpi_device_path_join(parent_dev,
"PSD0"));
}
/* call rtd3 method to Enable SRC Clock. */
- if (wwan_fm350gl_get_rtd3_method_support(config) |
+ if (wwan_fm350gl_get_rtd3_method_support(config) &
ACPI_PCIE_RP_EMIT_SRCK) {
acpigen_emit_namestring(acpi_device_path_join(parent_dev,
"SRCK"));
@@ -131,7 +131,7 @@ static void wwan_fm350gl_acpi_method_shrf(const struct device *parent_dev,
/* De-assert PERST# GPIO. */
acpigen_disable_tx_gpio(&config->perst_gpio);
/* Call rtd3 method to trigger L2/L3 ready exit flow in root port */
- if (wwan_fm350gl_get_rtd3_method_support(config) |
+ if (wwan_fm350gl_get_rtd3_method_support(config) &
ACPI_PCIE_RP_EMIT_L23) {
acpigen_emit_namestring(acpi_device_path_join(parent_dev,
"L23D"));