PCI: qcom: fix a bitwise vs logical NOT typo
Subsystems (2)
PATCH 1/1 PCI: qcom: fix a bitwise vs logical NOT typo
There is a typo here so we accidentally set "val" to zero when we intended just to clear BIT(0).
---
Not tested.
drivers/pci/dwc/pcie-qcom.c +1 -1
@@ -869,7 +869,7 @@ static int qcom_pcie_init_2_4_0(struct qcom_pcie *pcie)/* enable PCIe clocks and resets */ val =readl (pcie->parf +PCIE20_PARF_PHY_CTRL ); - val &= !BIT (0 ); + val &= ~BIT (0 );writel (val, pcie->parf +PCIE20_PARF_PHY_CTRL );/* change DBI base address */
Hi Dan,
Thanks for the patch!
Quoted 14 lines · Dan Carpenter
There is a typo here so we accidentally set "val" to zero when we intended just to clear BIT(0).
Fixes 90d52d57ccac ("PCI: qcom: Add support for IPQ4019 PCIe controller")Signed-off-by Dan Carpenter <[email protected]>---
Not tested.drivers/pci/dwc/pcie-qcom.c +0
-0
drivers/pci/dwc/pcie-qcom.c static int qcom_pcie_init_2_4_0(struct qcom_pcie *pcie) · line 875
Quoted 8 lines
drivers/pci/dwc/pcie-qcom.c +1
-1@@ -869,7 +869,7 @@ static int qcom_pcie_init_2_4_0(struct qcom_pcie *pcie)/* enable PCIe clocks and resets */ val =readl (pcie->parf +PCIE20_PARF_PHY_CTRL ); - val &= !BIT (0 ); + val &= ~BIT (0 );writel (val, pcie->parf +PCIE20_PARF_PHY_CTRL );/* change DBI base address */
John, can you test that fix?
Otherwise the fix looks correct:
regards,
Stan
John Crispin
Acked-byQuoted 30 lines · Stanimir Varbanov
Hi Dan,
Thanks for the patch!
Quoted 14 lines · Dan Carpenter
There is a typo here so we accidentally set "val" to zero when we intended just to clear BIT(0).
Fixes 90d52d57ccac ("PCI: qcom: Add support for IPQ4019 PCIecontroller")
Signed-off-by Dan Carpenter <[email protected]>---
Not tested.drivers/pci/dwc/pcie-qcom.c +0
-0drivers/pci/dwc/pcie-qcom.c static int qcom_pcie_init_2_4_0(struct qcom_pcie · line 875
Quoted 8 lines
drivers/pci/dwc/pcie-qcom.c +1
-1@@ -869,7 +869,7 @@ static int qcom_pcie_init_2_4_0(struct qcom_pcie *pcie) /* enable PCIe clocks and resets */ val = readl(pcie->parf + PCIE20_PARF_PHY_CTRL); - val &= !BIT(0); + val &= ~BIT(0); writel(val, pcie->parf + PCIE20_PARF_PHY_CTRL); /* change DBI base address */John, can you test that fix?
Quoted 6 lines
Otherwise the fix looks correct:
regards,
Stan
Lorenzo Pieralisi
AppliedQuoted 13 lines · Dan Carpenter
There is a typo here so we accidentally set "val" to zero when we intended just to clear BIT(0).
Fixes 90d52d57ccac ("PCI: qcom: Add support for IPQ4019 PCIe controller")Signed-off-by Dan Carpenter <[email protected]>---
Not tested.drivers/pci/dwc/pcie-qcom.c +0
-0
drivers/pci/dwc/pcie-qcom.c static int qcom_pcie_init_2_4_0(struct qcom_pcie *pcie) · line 875
Quoted 8 lines
drivers/pci/dwc/pcie-qcom.c +1
-1@@ -869,7 +869,7 @@ static int qcom_pcie_init_2_4_0(struct qcom_pcie *pcie)/* enable PCIe clocks and resets */ val =readl (pcie->parf +PCIE20_PARF_PHY_CTRL ); - val &= !BIT (0 ); + val &= ~BIT (0 );writel (val, pcie->parf +PCIE20_PARF_PHY_CTRL );/* change DBI base address */
Applied to pci/dwc for v4.18, thanks.
Lorenzo