summaryrefslogtreecommitdiff
path: root/drivers/pci/host/pci-imx6.c
diff options
context:
space:
mode:
authorRichard Zhu <hongxing.zhu@nxp.com>2017-06-15 11:41:34 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commitb808e0e5b577fc5178bb4c8644fd6b2183df2c2c (patch)
treec419f5e14c32001d3fc3ea41548a406e202cbecd /drivers/pci/host/pci-imx6.c
parentccc703061bb0307464ee5c9feb558546d56bf368 (diff)
MLK-15080 PCI: imx: pcie ep can't be probed properly
iMX7D Sabre SD board implement the GPIO expander connected to a peripheral bus. Probe deferral would be triggered when try to request the expanded GPIO at the first time. pcie ep can't be probed properly at the second probe, because of the duplicated registration of the sysfs. Change the registeration point of the sysfs to fix this issue. Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Diffstat (limited to 'drivers/pci/host/pci-imx6.c')
-rw-r--r--drivers/pci/host/pci-imx6.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/pci/host/pci-imx6.c b/drivers/pci/host/pci-imx6.c
index 250952e7691e..a9e0a32054b5 100644
--- a/drivers/pci/host/pci-imx6.c
+++ b/drivers/pci/host/pci-imx6.c
@@ -1201,14 +1201,6 @@ static int imx6_pcie_probe(struct platform_device *pdev)
imx6_pcie->variant =
(enum imx6_pcie_variants)of_device_get_match_data(dev);
- if (IS_ENABLED(CONFIG_EP_MODE_IN_EP_RC_SYS)) {
- /* add attributes for device */
- ret = sysfs_create_group(&pdev->dev.kobj, &imx_pcie_attrgroup);
- if (ret)
- return -EINVAL;
- }
-
-
np = of_find_compatible_node(NULL, NULL, "fsl,imx-pcie-phy");
if (np != NULL) {
imx6_pcie->phy_base = of_iomap(np, 0);
@@ -1391,6 +1383,11 @@ static int imx6_pcie_probe(struct platform_device *pdev)
LIST_HEAD(res);
struct resource_entry *win, *tmp;
+ /* add attributes for device */
+ ret = sysfs_create_group(&pdev->dev.kobj, &imx_pcie_attrgroup);
+ if (ret)
+ return -EINVAL;
+
ret = of_pci_get_host_bridge_resources(np, 0, 0xff, &res,
&pp->io_base);
if (ret)