devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Figa <tomasz.figa@gmail.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	Grant Likely <grant.likely@linaro.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linaro-mm-sig@lists.linaro.org, devicetree@vger.kernel.org,
	linux-doc@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>,
	Laura Abbott <lauraa@codeaurora.org>,
	Pawel Moll <pawel.moll@arm.com>, Arnd Bergmann <arnd@arndb.de>,
	Stephen Warren <swarren@wwwdotorg.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Tomasz Figa <t.figa@samsung.com>,
	Will Deacon <will.deacon@arm.com>,
	Michal Nazarewicz <mina86@mina86.com>,
	Marc <marc.ceeeee@gmail.com>,
	Nishanth Peethambaran <nishanth.p@gmail.com>,
	Rob Herring <robh+dt@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Kumar Gala <galak@codeaurora.org>,
	Olof Johansson <olof@lixom.net>,
	Josh Cartwright <joshc@codeaurora.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Ian Campbell <ian.campbell@citrix.com>
Subject: Re: [PATCH v5 01/11] of: document bindings for reserved-memory nodes
Date: Fri, 28 Feb 2014 11:01:50 +0100	[thread overview]
Message-ID: <53105E8E.1040504@gmail.com> (raw)
In-Reply-To: <53105CC6.1090902@samsung.com>

On 28.02.2014 10:54, Marek Szyprowski wrote:
> Hello,
>
> On 2014-02-26 12:51, Grant Likely wrote:
>> On Fri, 21 Feb 2014 13:25:17 +0100, Marek Szyprowski
>> <m.szyprowski@samsung.com> wrote:
>> > From: Grant Likely <grant.likely@linaro.org>
>> >
>> > Reserved memory nodes allow for the reservation of static (fixed
>> > address) regions, or dynamically allocated regions for a specific
>> > purpose.
>> >
>> > Signed-off-by: Grant Likely <grant.likely@linaro.org>
>> > [joshc: Based on binding document proposed (in non-patch form) here:
>> >
>> http://lkml.kernel.org/g/20131030134702.19B57C402A0@trevor.secretlab.ca
>> >  adapted to support #memory-region-cells]
>> > Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
>> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> > ---
>> >  .../bindings/reserved-memory/reserved-memory.txt   |  138
>> ++++++++++++++++++++
>> >  1 file changed, 138 insertions(+)
>> >  create mode 100644
>> Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
>> >
>> > diff --git
>> a/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
>>
>> > new file mode 100644
>> > index 000000000000..a606ce90c9c4
>> > --- /dev/null
>> > +++
>> b/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
>> > @@ -0,0 +1,138 @@
>> > +*** Reserved memory regions ***
>> > +
>> > +Reserved memory is specified as a node under the /reserved-memory
>> node.
>> > +The operating system shall exclude reserved memory from normal usage
>> > +one can create child nodes describing particular reserved (excluded
>> from
>> > +normal use) memory regions. Such memory regions are usually
>> designed for
>> > +the special usage by various device drivers.
>> > +
>> > +Parameters for each memory region can be encoded into the device tree
>> > +with the following nodes:
>> > +
>> > +/reserved-memory node
>> > +---------------------
>> > +#address-cells, #size-cells (required) - standard definition
>> > +    - Should use the same values as the root node
>> > +#memory-region-cells (required) - dictates number of cells used in
>> the child
>> > +                                  nodes memory-region specifier
>>
>> I still don't like this portion of the binding. I'm not convinced that
>> it is necessary in the majority of cases and it is going to be very
>> driver specific. I would rather drop it entirely from the common
>> binding. If a specific driver needs to do something like the above then
>> it can have a driver specific binding. Otherwise I think the default
>> should be a simple phandle with no arguments to a single reserved memory
>> node.
>>
>> Ben, can you weigh in on the current state of this document. I'm mostly
>> happy with it aside from my comment above. Do you think this is ready to
>> be merged?
>>
>> > +ranges (required) - standard definition
>> > +    - Should be empty
>> > +
>> > +/reserved-memory/ child nodes
>> > +-----------------------------
>> > +Each child of the reserved-memory node specifies one or more
>> regions of
>> > +reserved memory. Each child node may either use a 'reg' property to
>> > +specify a specific range of reserved memory, or a 'size' property with
>> > +optional constraints to request a dynamically allocated block of
>> memory.
>> > +
>> > +Following the generic-names recommended practice, node names should
>> > +reflect the purpose of the node (ie. "framebuffer" or "dma-pool").
>> Unit
>> > +address (@<address>) should be appended to the name if the node is a
>> > +static allocation.
>> > +
>> > +Properties:
>> > +Requires either a) or b) below.
>> > +a) static allocation
>> > +   reg (required) - standard definition
>> > +b) dynamic allocation
>> > +   size (required) - length based on parent's #size-cells
>> > +                   - Size in bytes of memory to reserve.
>> > +   alignment (optional) - length based on parent's #size-cells
>> > +                        - Address boundary for alignment of
>> allocation.
>> > +   alloc-ranges (optional) - prop-encoded-array (address, length
>> pairs).
>> > +                           - Specifies regions of memory that are
>> > +                             acceptable to allocate from.
>> > +
>> > +If both reg and size are present, then the reg property takes
>> precedence
>> > +and size is ignored.
>> > +
>> > +Additional properties:
>> > +compatible (optional) - standard definition
>> > +    - may contain the following strings:
>> > +        - shared-dma-pool: This indicates a region of memory meant
>> to be
>> > +          used as a shared pool of DMA buffers for a set of
>> devices. It can
>> > +          be used by an operating system to instanciate the
>> necessary pool
>> > +          management subsystem if necessary.
>> > +        - vendor specific string in the form
>> <vendor>,[<device>-]<usage>
>>
>> Add "Use vendor strings to identify regions dedicates for a specific
>> vendor device. For example: 'acme,framebuffer'. Platform code can use
>> vendor
>> strings to identify device specific regions"
>
> So do you want to completely drop phandle based links between device
> nodes and
> memory regions?

Huh? How this would work with regions that have to be used for multiple 
(but not all - not a default region) devices?

Best regards,
Tomasz

  reply	other threads:[~2014-02-28 10:01 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 12:25 [PATCH v5 00/11] reserved-memory regions/CMA in devicetree, again Marek Szyprowski
     [not found] ` < 1392985527-6260-2-git-send-email-m.szyprowski@samsung.com>
     [not found] ` < 1392985527-6260-7-git-send-email-m.szyprowski@samsung.com>
     [not found] ` < 1392985527-6260-10-git-send-email-m.szyprowski@samsung.com>
     [not found]   ` < CAGa+x856+YyJ-vyfGoFAKmsqwKD+=Wh0-TT_mAaPStOXjd8eSQ@mail.gmail.com>
2014-02-21 12:25 ` [PATCH v5 01/11] of: document bindings for reserved-memory nodes Marek Szyprowski
2014-02-26 11:51   ` Grant Likely
2014-02-28  9:54     ` Marek Szyprowski
2014-02-28 10:01       ` Tomasz Figa [this message]
     [not found]       ` <53105CC6.1090902-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-03-01 19:58         ` Grant Likely
2014-02-21 12:25 ` [PATCH v5 02/11] drivers: of: add initialization code for static reserved memory Marek Szyprowski
2014-02-21 12:25 ` [PATCH v5 03/11] drivers: of: add initialization code for dynamic " Marek Szyprowski
2014-02-26 12:09   ` Grant Likely
2014-02-21 12:25 ` [PATCH v5 04/11] drivers: of: add support for custom reserved memory drivers Marek Szyprowski
2014-02-21 12:25 ` [PATCH v5 05/11] drivers: of: add automated assignment of reserved regions to client devices Marek Szyprowski
2014-02-21 12:25 ` [PATCH v5 06/11] drivers: of: initialize and assign reserved memory to newly created devices Marek Szyprowski
2014-02-26 12:14   ` Grant Likely
2014-02-27 10:10     ` Marek Szyprowski
2014-03-01 20:20       ` Grant Likely
2014-02-21 12:25 ` [PATCH v5 07/11] drivers: dma-coherent: add initialization from device tree Marek Szyprowski
2014-02-21 12:25 ` [PATCH v5 08/11] drivers: dma-contiguous: " Marek Szyprowski
2014-02-21 12:25 ` [PATCH v5 09/11] arm: add support for reserved memory defined by " Marek Szyprowski
2014-03-13 20:46   ` Kevin Hilman
2014-03-13 21:36     ` Josh Cartwright
2014-03-13 21:51       ` Kevin Hilman
2014-03-15 13:07         ` Grant Likely
2014-02-21 12:25 ` [PATCH v5 10/11] arm64: " Marek Szyprowski
2014-02-21 12:25 ` [PATCH v5 11/11] powerpc: " Marek Szyprowski
     [not found] ` < 1392985527-6260-3-git-send-email-m.szyprowski@samsung.com>
     [not found]   ` <1392985527-6260-3-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-02-26 12:05     ` [PATCH v5 02/11] drivers: of: add initialization code for static reserved memory Grant Likely

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=53105E8E.1040504@gmail.com \
    --to=tomasz.figa@gmail.com \
    --cc=arnd@arndb.de \
    --cc=benh@kernel.crashing.org \
    --cc=catalin.marinas@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=ian.campbell@citrix.com \
    --cc=joshc@codeaurora.org \
    --cc=lauraa@codeaurora.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=marc.ceeeee@gmail.com \
    --cc=mark.rutland@arm.com \
    --cc=mina86@mina86.com \
    --cc=nishanth.p@gmail.com \
    --cc=olof@lixom.net \
    --cc=paulus@samba.org \
    --cc=pawel.moll@arm.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=swarren@wwwdotorg.org \
    --cc=t.figa@samsung.com \
    --cc=will.deacon@arm.com \
    /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).