Skip to content

Commit

Permalink
Merge branch 'remotes/lorenzo/pci/qcom'
Browse files Browse the repository at this point in the history
- Make sure PCIe is reset before init to work around QSDK U-Boot issue
  (Ansuel Smith)

- Set iproc affinity mask on MSI interrupts (Mark Tomlinson)

* remotes/lorenzo/pci/qcom:
  PCI: qcom: Make sure PCIe is reset before init for rev 2.1.0
  • Loading branch information
bjorn-helgaas committed Oct 21, 2020
2 parents be36e9b + d3d4d02 commit 3b35398
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/pci/controller/dwc/pcie-qcom.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ static void qcom_pcie_deinit_2_1_0(struct qcom_pcie *pcie)
reset_control_assert(res->por_reset);
reset_control_assert(res->ext_reset);
reset_control_assert(res->phy_reset);

writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL);

regulator_bulk_disable(ARRAY_SIZE(res->supplies), res->supplies);
}

Expand All @@ -309,6 +312,16 @@ static int qcom_pcie_init_2_1_0(struct qcom_pcie *pcie)
u32 val;
int ret;

/* reset the PCIe interface as uboot can leave it undefined state */
reset_control_assert(res->pci_reset);
reset_control_assert(res->axi_reset);
reset_control_assert(res->ahb_reset);
reset_control_assert(res->por_reset);
reset_control_assert(res->ext_reset);
reset_control_assert(res->phy_reset);

writel(1, pcie->parf + PCIE20_PARF_PHY_CTRL);

ret = regulator_bulk_enable(ARRAY_SIZE(res->supplies), res->supplies);
if (ret < 0) {
dev_err(dev, "cannot enable regulators\n");
Expand Down

0 comments on commit 3b35398

Please sign in to comment.