public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale•com>
To: Emil Medve <Emilian.Medve@Freescale•com>
Cc: mark.rutland@arm•com, devicetree@vger•kernel.org,
	pawel.moll@arm•com, ijc+devicetree@hellion•org.uk,
	Geoff.Thorpe@Freescale•com, corbet@lwn•net,
	linux-doc@vger•kernel.org, linuxppc-dev@ozlabs•org,
	robh+dt@kernel•org, galak@codeaurora•org
Subject: Re: [PATCH 1/4] dt/bindings: Introduce the FSL QorIQ DPAA BMan
Date: Tue, 28 Oct 2014 13:19:33 -0500	[thread overview]
Message-ID: <1414520373.23458.92.camel@snotra.buserror.net> (raw)
In-Reply-To: <1413986972-621-1-git-send-email-Emilian.Medve@Freescale.com>

On Wed, 2014-10-22 at 09:09 -0500, Emil Medve wrote:
> The Buffer Manager is part of the Data-Path Acceleration Architecture (DPAA).
> BMan supports hardware allocation and deallocation of buffers belonging to
> pools originally created by software with configurable depletion thresholds.
> This binding covers the CCSR space programming model
> 
> Signed-off-by: Emil Medve <Emilian.Medve@Freescale•com>
> Change-Id: I3ec479bfb3c91951e96902f091f5d7d2adbef3b2
> ---
>  .../devicetree/bindings/powerpc/fsl/bman.txt       | 98 ++++++++++++++++++++++
>  1 file changed, 98 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/powerpc/fsl/bman.txt
> 
> diff --git a/Documentation/devicetree/bindings/powerpc/fsl/bman.txt b/Documentation/devicetree/bindings/powerpc/fsl/bman.txt
> new file mode 100644
> index 0000000..c30bdde
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/powerpc/fsl/bman.txt
> @@ -0,0 +1,98 @@
> +QorIQ DPAA Buffer Manager Device Tree Bindings
> +
> +Copyright (C) 2008 - 2014 Freescale Semiconductor Inc.
> +
> +CONTENTS
> +
> +	- BMan Node
> +	- BMan Private Memory Node
> +	- Example
> +
> +NOTE:	The bindings described in this document are preliminary and subject to
> +	change
> +
> +BMan Node
> +
> +PROPERTIES
> +
> +- compatible
> +	Usage:		Required
> +	Value type:	<stringlist>
> +	Definition:	Must include "fsl,bman"
> +			May include "fsl,<SoC>-bman"
> +
> +- reg
> +	Usage:		Required
> +	Value type:	<prop-encoded-array>
> +	Definition:	Registers region within the CCSR address space

Is there a version register in reg?  It would be nice to point it out in
the binding along with an example chip for each version, similar to
Documentation/devicetree/bindings/powerpc/fsl/interlaken-lac.txt.  This
would make it clear that the compatible needs to be changed if the
version register moves or no longer works the same way.

> +BMan Private Memory Node
> +
> +BMan requires a contiguous range of physical memory used for the backing store
> +for BMan Free Buffer Proxy Records. This memory is reserved/allocated as a node
> +under the /reserved-memory node
> +
> +The BMan FBPR memory node must be named "bman-fbpr"
> +
> +PROPERTIES
> +
> +- compatible
> +	Usage:		required
> +	Value type:	<stringlist>
> +	Definition:	Must inclide "fsl,bman-fbpr"
> +
> +The following constraints are relevant to the FBPR private memory:
> +	- The size must be 2^(size + 1), with size = 11..33. That is 4 KiB to
> +	  16 GiB
> +	- The alignment must be a muliptle of the memory size
> +
> +The size of the FBPR must be chosen by observing the hardware features configured
> +via the RCW and that are relevant to a specific board (e.g. number of MAC(s)
> +pinned-out, number of offline/host command FMan ports, etc.). The size configured
> +in the DT must reflect the hardware capabilities and not the specific needs of an
> +application

What about accelerators?

> +If the memory reserved in the device tree proves to be larger then the needs of
> +the application a BMan driver may provide a method to release the extra memory
> +back to the OS

What if the memory reserved in the device tree proves to be smaller than
the needs of the application?

I think we should document this size as being a sane default for the
hardware, and add a way of describing that the size is tunable.

Below is the reserved-memory extension that I suggested to you
internally:

resizable (optional) - empty property
    - Indicates that the size of the dynamic allocation is flexible.  If
resizeable is present, the size property is optional.  If both resizable
and size are present, the size property indicates a recommended default
size for this hardware.

pow2-aligned (optional) - empty property
    - Only valid if resizable is present.  Indicates that the size must
be a power of two, and the address must be aligned to its size.  If both
pow2-aligned and alignment properties are present, pow2-aligned is used
if the region is resized, and the alignment property is used if the
region is not resized.

min-size (optional) - Only valid if resizable is present.  Specifies a
minimum acceptable size.

max-size (optional) - Only valid if resizable is present.  Specifies a
maximum acceptable size.

-Scott

      parent reply	other threads:[~2014-10-28 18:19 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22 14:09 [PATCH 1/4] dt/bindings: Introduce the FSL QorIQ DPAA BMan Emil Medve
2014-10-22 14:09 ` [PATCH 2/4] dt/bindings: Introduce the FSL QorIQ DPAA BMan portal(s) Emil Medve
2014-10-22 14:29   ` Mark Rutland
2014-10-22 20:04     ` Emil Medve
2014-10-23 11:16       ` Mark Rutland
2014-10-23 13:28         ` Geoff Thorpe
2014-10-24  9:26         ` Emil Medve
2014-10-28 18:09       ` Scott Wood
2014-10-22 14:09 ` [PATCH 3/4] dt/bindings: Introduce the FSL QorIQ DPAA QMan Emil Medve
2014-10-22 14:37   ` Mark Rutland
2014-10-22 20:05     ` Emil Medve
2014-10-23 11:26       ` Mark Rutland
2014-10-23 13:51         ` Geoff Thorpe
2014-10-24  9:53         ` Emil Medve
2014-10-22 14:09 ` [PATCH 4/4] dt/bindings: Introduce the FSL QorIQ DPAA QMan portal(s) Emil Medve
2014-10-28 18:27   ` Scott Wood
2014-10-28 14:36 ` [PATCH 1/4] dt/bindings: Introduce the FSL QorIQ DPAA BMan Kumar Gala
2014-10-28 18:08   ` Scott Wood
     [not found]   ` <1414519738.23458.84.camel__4795.38602890006$1414521743$gmane$org@snotra.buserror.net>
2014-10-29 21:40     ` Emil Medve
2014-10-29 22:16       ` Scott Wood
     [not found]       ` <1414620996.23458.141.camel__29590.7804662876$1414621051$gmane$org@snotra.buserror.net>
2014-10-30  4:32         ` Emil Medve
2014-10-30 14:51           ` Scott Wood
     [not found]           ` <1414680683.23458.148.camel__4514.07629666409$1414680744$gmane$org@snotra.buserror.net>
2014-10-30 16:19             ` Emil Medve
2014-10-30 16:29               ` Scott Wood
     [not found]               ` <1414686590.23458.151.camel__44619.4786033176$1414686664$gmane$org@snotra.buserror.net>
2014-10-30 16:45                 ` Emil Medve
2014-10-30 21:26                   ` Scott Wood
2014-10-30 21:30                     ` Emil Medve
2014-10-30 15:10       ` Varun Sethi
2014-10-28 18:19 ` Scott Wood [this message]

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=1414520373.23458.92.camel@snotra.buserror.net \
    --to=scottwood@freescale$(echo .)com \
    --cc=Emilian.Medve@Freescale$(echo .)com \
    --cc=Geoff.Thorpe@Freescale$(echo .)com \
    --cc=corbet@lwn$(echo .)net \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=galak@codeaurora$(echo .)org \
    --cc=ijc+devicetree@hellion$(echo .)org.uk \
    --cc=linux-doc@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@ozlabs$(echo .)org \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=pawel.moll@arm$(echo .)com \
    --cc=robh+dt@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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