linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Roy Pledge <roy.pledge@nxp.com>
To: <leoyang.li@nxp.com>, <linuxppc-dev@lists.ozlabs.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>
Cc: <oss@buserror.net>, <madalin.bucur@nxp.com>,
	<catalin.marinas@arm.com>, <linux@armlinux.org.uk>,
	<arnd@arndb.de>, <mark.rutland@arm.com>,
	Roy Pledge <roy.pledge@nxp.com>
Subject: [v5 02/12] soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocations
Date: Mon, 18 Sep 2017 16:39:37 -0400	[thread overview]
Message-ID: <1505767187-4596-3-git-send-email-roy.pledge@nxp.com> (raw)
In-Reply-To: <1505767187-4596-1-git-send-email-roy.pledge@nxp.com>

Use the shared-memory-pool mechanism for free buffer proxy record
area allocation.

Signed-off-by: Roy Pledge <roy.pledge@nxp.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

  parent reply	other threads:[~2017-09-18 20:39 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-18 20:39 [v5 00/12] soc/fsl/qbman: Enable QBMan on ARM Platforms Roy Pledge
2017-09-18 20:39 ` [v5 01/12] soc/fsl/qbman: Add common routine for QBMan private allocations Roy Pledge
2017-09-21 14:29   ` Catalin Marinas
2017-09-18 20:39 ` Roy Pledge [this message]
2017-09-21 14:30   ` [v5 02/12] soc/fsl/qbman: Use shared-dma-pool for BMan private memory allocations Catalin Marinas
2017-09-18 20:39 ` [v5 03/12] soc/fsl/qbman: Use shared-dma-pool for QMan " Roy Pledge
2017-09-21 14:30   ` Catalin Marinas
2017-09-18 20:39 ` [v5 04/12] dt-bindings: soc/fsl: Update reserved memory binding for QBMan Roy Pledge
2017-09-21 18:36   ` Leo Li
2017-09-21 23:14   ` Rob Herring
2017-09-18 20:39 ` [v5 05/12] soc/fsl/qbman: Drop set/clear_bits usage Roy Pledge
2017-09-21 14:31   ` Catalin Marinas
2017-09-18 20:39 ` [v5 06/12] soc/fsl/qbman: Drop L1_CACHE_BYTES compile time check Roy Pledge
2017-09-21 14:31   ` Catalin Marinas
2017-09-18 20:39 ` [v5 07/12] soc/fsl/qbman: Fix ARM32 typo Roy Pledge
2017-09-21 14:32   ` Catalin Marinas
2017-09-18 20:39 ` [v5 08/12] soc/fsl/qbman: Rework portal mapping calls for ARM/PPC Roy Pledge
2017-09-21 14:32   ` Catalin Marinas
2017-09-18 20:39 ` [v5 09/12] soc/fsl/qbman: add QMAN_REV32 Roy Pledge
2017-09-18 20:39 ` [v5 10/12] soc/fsl/qbman: different register offsets on ARM Roy Pledge
2017-09-18 20:39 ` [v5 11/12] soc/fsl/qbman: Add missing headers " Roy Pledge
2017-09-18 20:39 ` [v5 12/12] soc/fsl/qbman: Enable FSL_LAYERSCAPE config " Roy Pledge
2017-09-21 14:40 ` [v5 00/12] soc/fsl/qbman: Enable QBMan on ARM Platforms Catalin Marinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1505767187-4596-3-git-send-email-roy.pledge@nxp.com \
    --to=roy.pledge@nxp.com \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=madalin.bucur@nxp.com \
    --cc=mark.rutland@arm.com \
    --cc=oss@buserror.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).