summaryrefslogtreecommitdiff
path: root/drivers/soc/fsl/qbman
diff options
context:
space:
mode:
authorRoy Pledge <roy.pledge@nxp.com>2017-09-18 16:39:37 -0400
committerLi Yang <leoyang.li@nxp.com>2017-09-22 13:33:07 -0500
commit5ae783c6a1e5441250da8e015141bff6b29f54fc (patch)
tree559b76f58cc839da891e87cea914977ac5081c42 /drivers/soc/fsl/qbman
parent42d0349784c74d8a1e92cfbec120b9a6868b0c25 (diff)
soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocations
Use the shared-memory-pool mechanism for free buffer proxy record area allocation. Signed-off-by: Roy Pledge <roy.pledge@nxp.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Li Yang <leoyang.li@nxp.com>
Diffstat (limited to 'drivers/soc/fsl/qbman')
-rw-r--r--drivers/soc/fsl/qbman/bman_ccsr.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/soc/fsl/qbman/bman_ccsr.c b/drivers/soc/fsl/qbman/bman_ccsr.c
index eaa9585c7347..05c42235dd41 100644
--- a/drivers/soc/fsl/qbman/bman_ccsr.c
+++ b/drivers/soc/fsl/qbman/bman_ccsr.c
@@ -201,6 +201,21 @@ static int fsl_bman_probe(struct platform_device *pdev)
return -ENODEV;
}
+ /*
+ * If FBPR memory wasn't defined using the qbman compatible string
+ * try using the of_reserved_mem_device method
+ */
+ if (!fbpr_a) {
+ ret = qbman_init_private_mem(dev, 0, &fbpr_a, &fbpr_sz);
+ if (ret) {
+ dev_err(dev, "qbman_init_private_mem() failed 0x%x\n",
+ ret);
+ return -ENODEV;
+ }
+ }
+
+ dev_dbg(dev, "Allocated FBPR 0x%llx 0x%zx\n", fbpr_a, fbpr_sz);
+
bm_set_memory(fbpr_a, fbpr_sz);
err_irq = platform_get_irq(pdev, 0);