From: Stephen Warren <swarren@wwwdotorg.org>
To: Scott Wood <scottwood@freescale.com>
Cc: devicetree@vger.kernel.org, hongbo.zhang@freescale.com,
linux-kernel@vger.kernel.org, vinod.koul@intel.com, djbw@fb.com,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v7 2/3] DMA: Freescale: Add new 8-channel DMA engine device tree nodes
Date: Wed, 21 Aug 2013 17:15:46 -0600 [thread overview]
Message-ID: <52154A22.4090809@wwwdotorg.org> (raw)
In-Reply-To: <1377125827.5029.50.camel@snotra.buserror.net>
On 08/21/2013 04:57 PM, Scott Wood wrote:
> On Wed, 2013-08-21 at 16:40 -0600, Stephen Warren wrote:
>> On 07/29/2013 04:49 AM, hongbo.zhang@freescale.com wrote:
>>> +- ranges : describes the mapping between the address space of the
>>> + DMA channels and the address space of the DMA controller
>>
>> Oh, so looking at the example, this is simply about being able to write
>> the reg value in the child nodes more easily without having to write out
>> the full based address of the controller in each child node.
>>
>> I don't think the binding document should require this;
>
> It doesn't. It just requires that there be a mapping; it doesn't have
> to be any particular mapping.
>
>> all the binding document should care about is that the child nodes have a valid reg
>> value. Whether that reg value is <0x100100 0x80> without a ranges in the
>> top-level DMA
>
> Without a ranges property there is no translation and the registers
> would not be memory mappable. Linux may treat the absence of ranges as
> an identity mapping for compatibility with some broken OF trees, but
> it's not standard.
I would argue that missing ranges meaning 1:1 translation is now a
standard, given that it must be true to support some DTs, it therefore
can now be assumed?
>> nor or whether that reg value is <0x0 0x80> with a ranges
>> value in the top-level DMA node isn't something that the binding should
>> specify. Either way will work equally without affecting a driver for the
>> DMA controller; the parsing of reg with/without a ranges property is
>> more of a core part of DT than anything to do with this binding.
>>
>>> +- DMA channel nodes:
>>> + - compatible : must include "fsl,eloplus-dma-channel"
>>
>> Why do the channel nodes even need a compatible value? Presumably the
>> driver for the top-level DMA node will scan these dma-channel nodes to
>> extract the information it needs and will simply assume that all these
>> nodes are DMA channel nodes rather than something else? I suppose this
>> doesn't hurt, it just seems unnecessary unless you foresee other child
>> nodes types existing in the future and hence a need to differentiate
>> different types of nodes.
>
> Other than "this is how the existing binding works and we're not going
> to break compatibility", it allows the OS more flexibility to choose
> whether to bind to controllers or directly to the channels. Sometimes a
> channel will be labelled with a different compatible if it has a fixed
> purpose such as being connected to audio hardware (e.g. mpc8610_hpcd.dts
> where some channels are "fsl,ssi-dma-channel").
That sounds terribly like encoding policy into DT rather than it being a
HW description.
next prev parent reply other threads:[~2013-08-21 23:15 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 10:49 [PATCH v7 0/3] DMA: Freescale: Add support for 8-channel DMA engine hongbo.zhang
2013-07-29 10:49 ` [PATCH v7 1/3] DMA: Freescale: revise device tree binding document hongbo.zhang
2013-07-29 22:09 ` Scott Wood
2013-08-21 22:33 ` Stephen Warren
2013-08-21 22:45 ` Scott Wood
2013-08-21 23:12 ` Stephen Warren
2013-08-21 23:33 ` Scott Wood
2013-07-29 10:49 ` [PATCH v7 2/3] DMA: Freescale: Add new 8-channel DMA engine device tree nodes hongbo.zhang
2013-07-29 22:10 ` Scott Wood
2013-07-30 2:10 ` Hongbo Zhang
2013-08-21 22:40 ` Stephen Warren
2013-08-21 22:57 ` Scott Wood
2013-08-21 23:15 ` Stephen Warren [this message]
2013-08-21 23:31 ` Scott Wood
2013-08-22 0:27 ` Timur Tabi
2013-08-21 23:00 ` Scott Wood
2013-08-21 23:16 ` Stephen Warren
2013-08-23 3:17 ` Hongbo Zhang
2013-08-26 10:33 ` Hongbo Zhang
2013-07-29 10:49 ` [PATCH v7 3/3] DMA: Freescale: update driver to support 8-channel DMA engine hongbo.zhang
2013-07-29 10:59 ` [PATCH v7 0/3] DMA: Freescale: Add support for " Vinod Koul
2013-07-30 2:08 ` Hongbo Zhang
2013-08-20 8:33 ` Hongbo Zhang
2013-08-20 8:15 ` Vinod Koul
2013-08-21 6:59 ` Hongbo Zhang
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=52154A22.4090809@wwwdotorg.org \
--to=swarren@wwwdotorg.org \
--cc=devicetree@vger.kernel.org \
--cc=djbw@fb.com \
--cc=hongbo.zhang@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=scottwood@freescale.com \
--cc=vinod.koul@intel.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).