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>
diff --git a/src/drivers/wwan/fm/acpi_fm350gl.c b/src/drivers/wwan/fm/acpi_fm350gl.c
index 15d0ecc..67bd4a1 100644
--- a/src/drivers/wwan/fm/acpi_fm350gl.c
+++ b/src/drivers/wwan/fm/acpi_fm350gl.c
@@ -60,7 +60,7 @@
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 @@
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 @@
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 @@
/* 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"));