Skip to content

Commit d31eb21

Browse files
Richard Zhubjorn-helgaas
authored andcommitted
PCI: imx6: Remove apps_reset toggling from imx_pcie_{assert/deassert}_core_reset
apps_reset corresponds to LTSSM_EN in i.MX7, i.MX8MQ, i.MX8MM and i.MX8MP platforms. Since assertion/de-assertion of apps_reset is done in imx_pcie_ltssm_enable() and imx_pcie_ltssm_disable(), remove it from imx_pcie_assert_core_reset() and imx_pcie_deassert_core_reset(). This also fixes a failure in enumerating the PI7C9X2G608GP (hotplug) chip reliably on i.MX8MM, as reported by Tim. It should be noted that only i.MX7D, i.MX8MQ, i.MX8MM, and i.MX8MP platforms have the apps_reset logic, so this change doesn't have any effect on other platforms. Fixes: ef61c7d ("PCI: imx6: Deassert apps_reset in imx_pcie_deassert_core_reset()") Reported-by: Tim Harvey <[email protected]> Closes: https://lore.kernel.org/all/CAJ+vNU3ohR2YKTwC4xoYrc1z-neDoH2TTZcMHDy+poj9=jSy+w@mail.gmail.com/ Signed-off-by: Richard Zhu <[email protected]> [mani: reworded commit subject and description] Signed-off-by: Manivannan Sadhasivam <[email protected]> [bhelgaas: commit log] Signed-off-by: Bjorn Helgaas <[email protected]> Tested-by: Tim Harvey <[email protected]> # imx8mp-venice-gw74xx (i.MX8MP + hotplug capable switch) Reviewed-by: Frank Li <[email protected]> Cc: [email protected] Link: https://patch.msgid.link/[email protected]
1 parent 234b925 commit d31eb21

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,6 @@ static int imx95_pcie_core_reset(struct imx_pcie *imx_pcie, bool assert)
860860
static void imx_pcie_assert_core_reset(struct imx_pcie *imx_pcie)
861861
{
862862
reset_control_assert(imx_pcie->pciephy_reset);
863-
reset_control_assert(imx_pcie->apps_reset);
864863

865864
if (imx_pcie->drvdata->core_reset)
866865
imx_pcie->drvdata->core_reset(imx_pcie, true);
@@ -872,7 +871,6 @@ static void imx_pcie_assert_core_reset(struct imx_pcie *imx_pcie)
872871
static int imx_pcie_deassert_core_reset(struct imx_pcie *imx_pcie)
873872
{
874873
reset_control_deassert(imx_pcie->pciephy_reset);
875-
reset_control_deassert(imx_pcie->apps_reset);
876874

877875
if (imx_pcie->drvdata->core_reset)
878876
imx_pcie->drvdata->core_reset(imx_pcie, false);
@@ -1253,6 +1251,9 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp)
12531251
}
12541252
}
12551253

1254+
/* Make sure that PCIe LTSSM is cleared */
1255+
imx_pcie_ltssm_disable(dev);
1256+
12561257
ret = imx_pcie_deassert_core_reset(imx_pcie);
12571258
if (ret < 0) {
12581259
dev_err(dev, "pcie deassert core reset failed: %d\n", ret);

0 commit comments

Comments
 (0)