summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStefan Eichenberger <stefan.eichenberger@toradex.com>2023-04-28 12:39:38 +0200
committerStefan Eichenberger <eichest@gmail.com>2023-04-28 14:17:09 +0200
commit95b4e4bb8a106f916d94be8efb3ca6dacfc79466 (patch)
tree34b5cd9df99bc6979e5989c8434cd9ae5dae1f80 /drivers
parent30d00919db11c8ebdbb7cc199149729914b61b27 (diff)
PCI: imx: Disable vpcie in case that the PCIe PLL does not lock
If the PCIe PLL locking fails we also have to disable vpcie because it was already enabled before. Without this commit we get a warning when the kernel tries to free the vpcie regulator. Upstream-Status: Pending Mainline for i.MX 8X does not support PCIe yet, this patch cannot be upstreamed as of now. Fixes: f6bf1945c5d5 ("PCI: imx: Do not hang if REFCLK is missing") Signed-off-by: Stefan Eichenberger <stefan.eichenberger@toradex.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/controller/dwc/pci-imx6.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index ef6492f3fbbb..814003db2c9c 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1217,7 +1217,7 @@ static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie)
/* wait for phy pll lock firstly. */
ret = imx8_pcie_wait_for_phy_pll_lock(imx6_pcie);
if (ret)
- return ret;
+ goto err_vpcie;
break;
case IMX8MQ:
case IMX8MM:
@@ -1354,6 +1354,12 @@ static int imx6_pcie_deassert_core_reset(struct imx6_pcie *imx6_pcie)
}
return 0;
+
+err_vpcie:
+ if (imx6_pcie->vpcie)
+ regulator_disable(imx6_pcie->vpcie);
+
+ return ret;
}
static void imx6_pcie_configure_type(struct imx6_pcie *imx6_pcie)