Skip to content

Commit f409855

Browse files
committed
Merge branch 'remotes/lorenzo/pci/imx6'
- Allow host controller driver to probe successfully (as other drivers do) even if link is currently down (Fabio Estevam) - Enable i.MX6QP PCIe power management (Richard Zhu) - Invoke PHY exit function after PHY power off (Richard Zhu) - Assert i.MX8MM CLKREQ# even if no device present to avoid boot hangs (Richard Zhu) * remotes/lorenzo/pci/imx6: PCI: imx6: Assert i.MX8MM CLKREQ# even if no device present PCI: imx6: Invoke the PHY exit function after PHY power off PCI: imx6: Enable i.MX6QP PCIe power management support PCI: imx6: Allow to probe when dw_pcie_wait_for_link() fails
2 parents 8a43a74 + 45514f7 commit f409855

1 file changed

Lines changed: 6 additions & 13 deletions

File tree

drivers/pci/controller/dwc/pci-imx6.c

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -453,10 +453,6 @@ static int imx6_pcie_enable_ref_clk(struct imx6_pcie *imx6_pcie)
453453
case IMX7D:
454454
break;
455455
case IMX8MM:
456-
ret = clk_prepare_enable(imx6_pcie->pcie_aux);
457-
if (ret)
458-
dev_err(dev, "unable to enable pcie_aux clock\n");
459-
break;
460456
case IMX8MQ:
461457
ret = clk_prepare_enable(imx6_pcie->pcie_aux);
462458
if (ret) {
@@ -809,9 +805,7 @@ static int imx6_pcie_start_link(struct dw_pcie *pci)
809805
/* Start LTSSM. */
810806
imx6_pcie_ltssm_enable(dev);
811807

812-
ret = dw_pcie_wait_for_link(pci);
813-
if (ret)
814-
goto err_reset_phy;
808+
dw_pcie_wait_for_link(pci);
815809

816810
if (pci->link_gen == 2) {
817811
/* Allow Gen2 mode after the link is up. */
@@ -847,11 +841,7 @@ static int imx6_pcie_start_link(struct dw_pcie *pci)
847841
}
848842

849843
/* Make sure link training is finished as well! */
850-
ret = dw_pcie_wait_for_link(pci);
851-
if (ret) {
852-
dev_err(dev, "Failed to bring link up!\n");
853-
goto err_reset_phy;
854-
}
844+
dw_pcie_wait_for_link(pci);
855845
} else {
856846
dev_info(dev, "Link: Gen2 disabled\n");
857847
}
@@ -923,6 +913,7 @@ static void imx6_pcie_pm_turnoff(struct imx6_pcie *imx6_pcie)
923913
/* Others poke directly at IOMUXC registers */
924914
switch (imx6_pcie->drvdata->variant) {
925915
case IMX6SX:
916+
case IMX6QP:
926917
regmap_update_bits(imx6_pcie->iomuxc_gpr, IOMUXC_GPR12,
927918
IMX6SX_GPR12_PCIE_PM_TURN_OFF,
928919
IMX6SX_GPR12_PCIE_PM_TURN_OFF);
@@ -983,6 +974,7 @@ static int imx6_pcie_suspend_noirq(struct device *dev)
983974
case IMX8MM:
984975
if (phy_power_off(imx6_pcie->phy))
985976
dev_err(dev, "unable to power off PHY\n");
977+
phy_exit(imx6_pcie->phy);
986978
break;
987979
default:
988980
break;
@@ -1252,7 +1244,8 @@ static const struct imx6_pcie_drvdata drvdata[] = {
12521244
[IMX6QP] = {
12531245
.variant = IMX6QP,
12541246
.flags = IMX6_PCIE_FLAG_IMX6_PHY |
1255-
IMX6_PCIE_FLAG_IMX6_SPEED_CHANGE,
1247+
IMX6_PCIE_FLAG_IMX6_SPEED_CHANGE |
1248+
IMX6_PCIE_FLAG_SUPPORTS_SUSPEND,
12561249
.dbi_length = 0x200,
12571250
},
12581251
[IMX7D] = {

0 commit comments

Comments
 (0)