MLK-15351: PCI: imx: Only use pcie_bus_regulator for iMX6QP
authorTiberiu Breana <andrei-tiberiu.breana@nxp.com>
Fri, 11 Jan 2019 10:27:37 +0000 (15:57 +0530)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
The pcie_bus_regulator is only used by the iMX6QP board,
so only request the regulator for this variant.

Signed-off-by: Tiberiu Breana <andrei-tiberiu.breana@nxp.com>
rebase on v4.19
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
drivers/pci/controller/dwc/pci-imx6.c

index 2746f8a..ed58b91 100644 (file)
@@ -1845,10 +1845,13 @@ static int __init imx6_pcie_probe(struct platform_device *pdev)
                return PTR_ERR(imx6_pcie->pcie);
        }
 
-       imx6_pcie->pcie_bus_regulator = devm_regulator_get(dev,
-                                                          "pcie-bus");
-       if (IS_ERR(imx6_pcie->pcie_bus_regulator))
-               imx6_pcie->pcie_bus_regulator = NULL;
+       if (imx6_pcie->variant == IMX6QP) {
+               imx6_pcie->pcie_bus_regulator = devm_regulator_get(dev,
+                               "pcie-bus");
+               if (IS_ERR(imx6_pcie->pcie_bus_regulator))
+                       imx6_pcie->pcie_bus_regulator = NULL;
+       } else {
+       }
 
        /* Grab GPR config register range */
        if (imx6_pcie->variant == IMX7D) {