MLK-16108 PCI: imx: turn on pd for imx8mq pcie
authorRichard Zhu <hongxing.zhu@nxp.com>
Mon, 14 Jan 2019 09:13:47 +0000 (14:43 +0530)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Root cause:
Poewr domain of the PCIEs are turned off, and
not turned on properly in previous ATF.

The PDs of PCIE1/2 have the dependency.
Both of the PDs should be operated at same time.
This issue is gone after update the PDs operations
in ATF.
In order to make sure that the PDs are turned on,
Turn power domain for imx8mq pcie explicitly in
driver.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
rebase on v4.19
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
drivers/pci/controller/dwc/pci-imx6.c

index 56c1ee7..dec4bf8 100644 (file)
@@ -1291,6 +1291,7 @@ err_reset_phy:
                        clk_disable_unprepare(imx6_pcie->pcie_inbound_axi);
                release_bus_freq(BUS_FREQ_HIGH);
                if ((imx6_pcie->variant == IMX7D)
+                               || (imx6_pcie->variant == IMX8MQ)
                                || (imx6_pcie->variant == IMX8QM)
                                || (imx6_pcie->variant == IMX8QXP))
                        pm_runtime_put_sync(pci->dev);
@@ -1312,8 +1313,10 @@ static int imx6_pcie_host_init(struct pcie_port *pp)
        struct imx6_pcie *imx6_pcie = to_imx6_pcie(pci);
 
        /* enable disp_mix power domain */
-       if ((imx6_pcie->variant == IMX7D) || (imx6_pcie->variant == IMX8QM)
-                               || (imx6_pcie->variant == IMX8QXP))
+       if ((imx6_pcie->variant == IMX7D)
+                       || (imx6_pcie->variant == IMX8MQ)
+                       || (imx6_pcie->variant == IMX8QM)
+                       || (imx6_pcie->variant == IMX8QXP))
                pm_runtime_get_sync(pci->dev);
 
        imx6_pcie_assert_core_reset(imx6_pcie);
@@ -2045,7 +2048,10 @@ static int __init imx6_pcie_probe(struct platform_device *pdev)
                pp->ops = &imx6_pcie_host_ops;
 
                /* enable disp_mix power domain */
-               if (imx6_pcie->variant == IMX7D)
+               if ((imx6_pcie->variant == IMX7D)
+                               || (imx6_pcie->variant == IMX8MQ)
+                               || (imx6_pcie->variant == IMX8QM)
+                               || (imx6_pcie->variant == IMX8QXP))
                        pm_runtime_get_sync(dev);
 
                imx6_pcie_assert_core_reset(imx6_pcie);