From 1435acbb36cb37ca170affb9d0563bacef6193de Mon Sep 17 00:00:00 2001 From: Richard Zhu Date: Wed, 2 Aug 2017 09:45:41 +0800 Subject: [PATCH] MLK-16108 PCI: imx: turn on pd for imx8mq pcie 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 --- drivers/pci/host/pci-imx6.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c index c0f2dc9558bb..a4b3706a0d61 100644 --- a/drivers/pci/host/pci-imx6.c +++ b/drivers/pci/host/pci-imx6.c @@ -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); -- 2.17.1