aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLaurentiu Tudor <laurentiu.tudor@nxp.com>2018-09-26 09:22:32 -0400
committerLi Yang <leoyang.li@nxp.com>2018-10-05 15:01:46 -0400
commite0940b34c40e95d1879691d2474d182c57aae0de (patch)
treecc3fe309d2aa7f9360007a92c98ca09a12dac2c8 /drivers
parentf1c98ee699314c6512522703b2bc0ed0afd08ad1 (diff)
soc: fsl: bman_portals: defer probe after bman's probe
A crash in bman portal probing could not be triggered (as is the case with qman portals) but it does make calls [1] into the bman driver so lets make sure the bman portal probing happens after bman's. [1] bman_p_irqsource_add() (in bman) called by: init_pcfg() called by: bman_portal_probe() Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com> Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/soc/fsl/qbman/bman_portal.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/soc/fsl/qbman/bman_portal.c b/drivers/soc/fsl/qbman/bman_portal.c
index 088cdfa7c034..2c95cf59f3e7 100644
--- a/drivers/soc/fsl/qbman/bman_portal.c
+++ b/drivers/soc/fsl/qbman/bman_portal.c
@@ -93,7 +93,15 @@ static int bman_portal_probe(struct platform_device *pdev)
93 struct device_node *node = dev->of_node; 93 struct device_node *node = dev->of_node;
94 struct bm_portal_config *pcfg; 94 struct bm_portal_config *pcfg;
95 struct resource *addr_phys[2]; 95 struct resource *addr_phys[2];
96 int irq, cpu; 96 int irq, cpu, err;
97
98 err = bman_is_probed();
99 if (!err)
100 return -EPROBE_DEFER;
101 if (err < 0) {
102 dev_err(&pdev->dev, "failing probe due to bman probe error\n");
103 return -ENODEV;
104 }
97 105
98 pcfg = devm_kmalloc(dev, sizeof(*pcfg), GFP_KERNEL); 106 pcfg = devm_kmalloc(dev, sizeof(*pcfg), GFP_KERNEL);
99 if (!pcfg) 107 if (!pcfg)