[no subject]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -776,7 +776,6 @@ static int imx7d_pcie_core_reset(struct imx_pcie *imx_pcie, bool assert)
 static void imx_pcie_assert_core_reset(struct imx_pcie *imx_pcie)
 {
        reset_control_assert(imx_pcie->pciephy_reset);
-       reset_control_assert(imx_pcie->apps_reset);

        if (imx_pcie->drvdata->core_reset)
                imx_pcie->drvdata->core_reset(imx_pcie, true);
@@ -788,7 +787,6 @@ static void imx_pcie_assert_core_reset(struct imx_pcie *imx_pcie)
 static int imx_pcie_deassert_core_reset(struct imx_pcie *imx_pcie)
 {
        reset_control_deassert(imx_pcie->pciephy_reset);
-       reset_control_deassert(imx_pcie->apps_reset);

        if (imx_pcie->drvdata->core_reset)
                imx_pcie->drvdata->core_reset(imx_pcie, false);
@@ -1176,6 +1174,9 @@ static int imx_pcie_host_init(struct dw_pcie_rp *pp)
                }
        }

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

> I notice the sequence of events here is:
> imx_pcie_assert_core_reset asserts apps_reset (disables LTSSM)
> imx_pcie_deassert_core_reset deasserts apps_reset (enables LTSSM)
> imx_pcie_ltssm_enable deasserts apps_reset (enables LTSSM; this is where it
> hangs on imx8mp)
> 
> Is there perhaps some issue with de-asserting this (enabling LTSSM) when it's
> already in this state?
[Richard Zhu]The apps_reset is updated by src driver by regmap_update_bits().
I can't find the exceptions to update one bit, already has the according value.

Best Regards
Richard Zhu
> 
> In the case where downstream devices do not enumerate some investigation
> points to them not being happy that the link drops so perhaps deasserting
> apps_reset when its already asserted drops the link and restarts it?
> 
> Best Regards,
> 
> Tim




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux