MLK-16108 PCI: imx: turn on pd for imx8mq pcie
authorRichard Zhu <hongxing.zhu@nxp.com>
Wed, 2 Aug 2017 01:45:41 +0000 (09:45 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:36:14 +0000 (15:36 -0500)
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>
drivers/pci/host/pci-imx6.c

index c0f2dc9..a4b3706 100644 (file)
@@ -1259,6 +1259,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(pp->dev);
@@ -1279,8 +1280,10 @@ static int imx6_pcie_host_init(struct pcie_port *pp)
        struct imx6_pcie *imx6_pcie = to_imx6_pcie(pp);
 
        /* 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(pp->dev);
 
        imx6_pcie_assert_core_reset(imx6_pcie);
@@ -2016,7 +2019,10 @@ static int 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(pp->dev);
 
                imx6_pcie_assert_core_reset(imx6_pcie);