[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1505767187-4596-3-git-send-email-roy.pledge@nxp.com>
Date: Mon, 18 Sep 2017 16:39:37 -0400
From: Roy Pledge <roy.pledge@....com>
To: <leoyang.li@....com>, <linuxppc-dev@...ts.ozlabs.org>,
<linux-arm-kernel@...ts.infradead.org>,
<linux-kernel@...r.kernel.org>, <devicetree@...r.kernel.org>
CC: <oss@...error.net>, <madalin.bucur@....com>,
<catalin.marinas@....com>, <linux@...linux.org.uk>,
<arnd@...db.de>, <mark.rutland@....com>,
Roy Pledge <roy.pledge@....com>
Subject: [v5 02/12] 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@....com>
---
drivers/soc/fsl/qbman/bman_ccsr.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/soc/fsl/qbman/bman_ccsr.c b/drivers/soc/fsl/qbman/bman_ccsr.c
index eaa9585..05c4223 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);
--
2.7.4
Powered by blists - more mailing lists