Patch "PCI: imx6: Initialize PHY before deasserting core reset" has been added to the 6.0-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    PCI: imx6: Initialize PHY before deasserting core reset

to the 6.0-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     pci-imx6-initialize-phy-before-deasserting-core-rese.patch
and it can be found in the queue-6.0 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit fa95d9da9a2d777df5d0766ea4e42171860e8e23
Author: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
Date:   Tue Nov 1 10:57:14 2022 +0100

    PCI: imx6: Initialize PHY before deasserting core reset
    
    [ Upstream commit ae6b9a65af480144da323436d90e149501ea8937 ]
    
    When the PHY is the reference clock provider then it must be initialized
    and powered on before the reset on the client is deasserted, otherwise
    the link will never come up. The order was changed in cf236e0c0d59.
    Restore the correct order to make the driver work again on boards where
    the PHY provides the reference clock. This also changes the order for
    boards where the Soc is the PHY reference clock divider, but this
    shouldn't do any harm.
    
    Link: https://lore.kernel.org/r/20221101095714.440001-1-s.hauer@xxxxxxxxxxxxxx
    Fixes: cf236e0c0d59 ("PCI: imx6: Do not hide PHY driver callbacks and refine the error handling")
    Tested-by: Richard Zhu <hongxing.zhu@xxxxxxx>
    Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
    Signed-off-by: Lorenzo Pieralisi <lpieralisi@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index 6e5debdbc55b..6ffe95d68ae7 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -942,12 +942,6 @@ static int imx6_pcie_host_init(struct dw_pcie_rp *pp)
 		}
 	}
 
-	ret = imx6_pcie_deassert_core_reset(imx6_pcie);
-	if (ret < 0) {
-		dev_err(dev, "pcie deassert core reset failed: %d\n", ret);
-		goto err_phy_off;
-	}
-
 	if (imx6_pcie->phy) {
 		ret = phy_init(imx6_pcie->phy);
 		if (ret) {
@@ -955,6 +949,13 @@ static int imx6_pcie_host_init(struct dw_pcie_rp *pp)
 			goto err_phy_off;
 		}
 	}
+
+	ret = imx6_pcie_deassert_core_reset(imx6_pcie);
+	if (ret < 0) {
+		dev_err(dev, "pcie deassert core reset failed: %d\n", ret);
+		goto err_phy_off;
+	}
+
 	imx6_setup_phy_mpll(imx6_pcie);
 
 	return 0;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux