From 92d449902e309b960c539e2f147b157980d50b3a Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sun, 13 Feb 2022 13:37:04 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/61899 Tested-by: build bot (Jenkins) Reviewed-by: Cliff Huang Reviewed-by: Tim Wawrzynczak --- src/drivers/wwan/fm/acpi_fm350gl.c | 10 +++++----- 1 file 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"));