mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-04-16 04:13:31 +00:00
61 lines
1.7 KiB
Diff
61 lines
1.7 KiB
Diff
From 7d94f8748116ebb9e81629d7c8dd5fe5f63648aa Mon Sep 17 00:00:00 2001
|
|
From: Sivaprakash Murugesan <sivaprak@codeaurora.org>
|
|
Date: Sat, 26 Jun 2021 00:42:33 +0200
|
|
Subject: [PATCH] PCI: qcom: Do PHY power on before PCIe init
|
|
|
|
Commit cc1e06f033af ("phy: qcom: qmp: Use power_on/off ops for PCIe")
|
|
changed phy ops from init/deinit to power on/off, due to this phy enable
|
|
is getting called after PCIe init.
|
|
|
|
On some platforms like ipq8074 phy should be inited before accessing the
|
|
PCIe register space, otherwise the system would hang.
|
|
|
|
So move phy_power_on API before PCIe init.
|
|
|
|
Fixes: commit cc1e06f033af ("phy: qcom: qmp: Use power_on/off ops for PCIe")
|
|
Co-developed-by: Selvam Sathappan Periakaruppan <speriaka@codeaurora.org>
|
|
Signed-off-by: Selvam Sathappan Periakaruppan <speriaka@codeaurora.org>
|
|
Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org>
|
|
---
|
|
drivers/pci/controller/dwc/pcie-qcom.c | 12 ++++++------
|
|
1 file changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
--- a/drivers/pci/controller/dwc/pcie-qcom.c
|
|
+++ b/drivers/pci/controller/dwc/pcie-qcom.c
|
|
@@ -1411,18 +1411,18 @@ static int qcom_pcie_host_init(struct pc
|
|
|
|
qcom_ep_reset_assert(pcie);
|
|
|
|
- ret = pcie->ops->init(pcie);
|
|
+ ret = phy_power_on(pcie->phy);
|
|
if (ret)
|
|
return ret;
|
|
|
|
- ret = phy_power_on(pcie->phy);
|
|
+ ret = pcie->ops->init(pcie);
|
|
if (ret)
|
|
- goto err_deinit;
|
|
+ goto err_disable_phy;
|
|
|
|
if (pcie->ops->post_init) {
|
|
ret = pcie->ops->post_init(pcie);
|
|
if (ret)
|
|
- goto err_disable_phy;
|
|
+ goto err_deinit;
|
|
}
|
|
|
|
dw_pcie_setup_rc(pp);
|
|
@@ -1430,10 +1430,10 @@ static int qcom_pcie_host_init(struct pc
|
|
|
|
return 0;
|
|
|
|
-err_disable_phy:
|
|
- phy_power_off(pcie->phy);
|
|
err_deinit:
|
|
pcie->ops->deinit(pcie);
|
|
+err_disable_phy:
|
|
+ phy_power_off(pcie->phy);
|
|
|
|
return ret;
|
|
}
|