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>
This commit is contained in:
Angel Pons 2022-02-13 13:37:04 +01:00 committed by Felix Held
parent d85319a12d
commit 92d449902e
1 changed files with 5 additions and 5 deletions

View File

@ -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"));