Skip to content

Commit ee367e2

Browse files
AnsuelLorenzo Pieralisi
authored andcommitted
PCI: qcom: Add missing reset for ipq806x
Add missing ext reset used by ipq8064 SoC in PCIe qcom driver. Link: https://lore.kernel.org/r/[email protected] Fixes: 82a8238 ("PCI: qcom: Add Qualcomm PCIe controller driver") Signed-off-by: Sham Muthayyan <[email protected]> Signed-off-by: Ansuel Smith <[email protected]> Signed-off-by: Lorenzo Pieralisi <[email protected]> Reviewed-by: Rob Herring <[email protected]> Reviewed-by: Philipp Zabel <[email protected]> Acked-by: Stanimir Varbanov <[email protected]> Cc: [email protected] # v4.5+
1 parent dd58318 commit ee367e2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/pci/controller/dwc/pcie-qcom.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ struct qcom_pcie_resources_2_1_0 {
9595
struct reset_control *ahb_reset;
9696
struct reset_control *por_reset;
9797
struct reset_control *phy_reset;
98+
struct reset_control *ext_reset;
9899
struct regulator_bulk_data supplies[QCOM_PCIE_2_1_0_MAX_SUPPLY];
99100
};
100101

@@ -272,6 +273,10 @@ static int qcom_pcie_get_resources_2_1_0(struct qcom_pcie *pcie)
272273
if (IS_ERR(res->por_reset))
273274
return PTR_ERR(res->por_reset);
274275

276+
res->ext_reset = devm_reset_control_get_optional_exclusive(dev, "ext");
277+
if (IS_ERR(res->ext_reset))
278+
return PTR_ERR(res->ext_reset);
279+
275280
res->phy_reset = devm_reset_control_get_exclusive(dev, "phy");
276281
return PTR_ERR_OR_ZERO(res->phy_reset);
277282
}
@@ -285,6 +290,7 @@ static void qcom_pcie_deinit_2_1_0(struct qcom_pcie *pcie)
285290
reset_control_assert(res->axi_reset);
286291
reset_control_assert(res->ahb_reset);
287292
reset_control_assert(res->por_reset);
293+
reset_control_assert(res->ext_reset);
288294
reset_control_assert(res->phy_reset);
289295
clk_disable_unprepare(res->iface_clk);
290296
clk_disable_unprepare(res->core_clk);
@@ -343,6 +349,12 @@ static int qcom_pcie_init_2_1_0(struct qcom_pcie *pcie)
343349
goto err_deassert_ahb;
344350
}
345351

352+
ret = reset_control_deassert(res->ext_reset);
353+
if (ret) {
354+
dev_err(dev, "cannot deassert ext reset\n");
355+
goto err_deassert_ahb;
356+
}
357+
346358
/* enable PCIe clocks and resets */
347359
val = readl(pcie->parf + PCIE20_PARF_PHY_CTRL);
348360
val &= ~BIT(0);

0 commit comments

Comments
 (0)