diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2020-09-29 13:56:49 +0300 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2021-01-27 20:58:49 +0200 |
commit | ec0300a9c9396f2be72807ffba0c4550f0ae3a99 (patch) | |
tree | 52c0bbda87ef4c4779770f30595140fa7cfa77b3 /drivers/pci/controller/dwc/pci-imx6.c | |
parent | d0ae62eaef1dc59b4195e0a2a784628720dc0939 (diff) |
pci: imx6q-pcie: fix extra probing
The driver pci-imx6 tries to get pcie-phy node for all variants
of PCIe controller, whereas it has sense for iMX8MP variant only.
Avoid probing pcie-phy for non-iMX8MP SoC.
It also fixes false warnings "couldn't get pcie-phy" for other variants.
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Conflicts:
drivers/pci/controller/dwc/pci-imx6.c
Signed-off-by: Oleksandr Suvorov <oleksandr.suvorov@toradex.com>
Diffstat (limited to 'drivers/pci/controller/dwc/pci-imx6.c')
-rw-r--r-- | drivers/pci/controller/dwc/pci-imx6.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 2ad1f08d4df2..15edcb6145a0 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -2410,12 +2410,16 @@ static int imx6_pcie_probe(struct platform_device *pdev) } } - imx6_pcie->phy = devm_phy_get(dev, "pcie-phy"); - if (IS_ERR(imx6_pcie->phy)) { - if (PTR_ERR(imx6_pcie->phy) == -EPROBE_DEFER) - return -EPROBE_DEFER; - /* Set NULL if there is no pcie-phy */ - imx6_pcie->phy = NULL; + /* pcie-phy uses in iMX8MP variant only */ + if (imx6_pcie->drvdata->variant == IMX8MP) { + imx6_pcie->phy = devm_phy_get(dev, "pcie-phy"); + if (IS_ERR(imx6_pcie->phy)) { + if (PTR_ERR(imx6_pcie->phy) == -EPROBE_DEFER) + return -EPROBE_DEFER; + dev_info(dev, "couldn't get pcie-phy\n"); + /* Set NULL if there is no pcie-phy */ + imx6_pcie->phy = NULL; + } } /* Find the HSIO MIX if one is defined, only imx8mp uses it */ |