From: Scott Wood <scottwood@freescale.com>
To: Segher Boessenkool <segher@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, paulus@samba.org
Subject: Re: [PATCH 1/4] Add DMA sector to Documentation/powerpc/booting-without-of.txt file.
Date: Wed, 11 Jul 2007 13:18:08 -0500 [thread overview]
Message-ID: <46951EE0.6040603@freescale.com> (raw)
In-Reply-To: <01035B4E-01EB-479A-9AA7-BCFBF6C60904@kernel.crashing.org>
Segher Boessenkool wrote:
> The generic DMA driver can look at the device tree, too. It's more
> convenient to only have to look at the dma-controller node, true.
> But with the proposed tree you have to look at all the channel nodes
> already.
But if the only way to tell is a phandle from the sound device, it has
to look at the sound node as well, and somehow figure out where in the
sound node the phandle is stored.
>> I don't see the need for a master node -- there are no shared
>> registers (other than a redundant read-only status summary
>> register) to synchronize access to. Each channel would be an
>> independent device under the SoC bus.
>
>
> The "master" node is needed to describe its register block. It
> doesn't matter whether you want to use those registers currently or
> not.
It doesn't have a register block, as such. There's one fairly useless
read-only register, that if we really wanted to we could describe as a
second reg resource in each channel, combined with a channel-ID property.
I'm not inclined to bother, though -- not because we don't currently use
it, but because I have a hard time seeing anyone needing to use it.
There is no information in that register that is not the individual
channels' registers. I'd just lump it in with all of the other assorted
SoC registers that we don't describe in the device tree.
>> The benefit is that if a channel needs to be driven by (for
>> example) a sound driver, it can have a different compatible that
>> will be matched by the sound driver,
>
>
> Nah, the sound node should just point to the channel node, or point
> to the DMA controller and describe the channel # some other way.
> There is no need to make a special "sound DMA channel" device name.
It's by far the simplest way to tell the generic DMA driver "do not
touch". "fsl,mpc8548-dma" says "this is a generic, mem-to-mem DMA
channel". "fsl,mpc8548-audio-dma" says "this is a non-generic DMA
channel, hooked up to an audio codec".
Would you prefer something like "fsl,mpc8548-dma-special-purpose"?
Though there's also the possibility that there might be no other node to
indicate the function, and that the only way to program the device is to
start DMA.
> Sure. But you yourself already say "most of the time" -- and the
> device tree doesn't describe how the kernel uses the hardware, it
> simply describes the hardware itself.
Precisely. If the fsl,whatever-audio-dma driver wants to call the
generic DMA code, it can do so without the device tree's help. I see no
reason to give the mem-to-mem DMA driver special status compared to
other users of the DMA channels.
> The sound DMA channel is part of the DMA controller, it is only
> _connected_ to the sound controller, it shouldn't be described as
> being more closely connected to the sound stuff than it actually is.
It's not as if I'm suggesting making it a child of the sound node --
just that each channel be a separate SoC-level device, and only
mem-to-mem channels match the mem-to-mem driver.
-Scott
next prev parent reply other threads:[~2007-07-11 18:18 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-10 9:44 [PATCH 0/4] DMA engine driver for Freescale MPC8xxx processor Zhang Wei
2007-07-10 9:44 ` [PATCH 1/4] Add DMA sector to Documentation/powerpc/booting-without-of.txt file Zhang Wei
2007-07-10 9:44 ` [PATCH 2/4] Add dma sector to mpc8641hpcn board dts Zhang Wei
2007-07-10 13:55 ` Segher Boessenkool
2007-07-11 7:16 ` Zhang Wei-r63237
2007-07-11 11:27 ` Segher Boessenkool
2007-07-12 9:51 ` Zhang Wei-r63237
2007-07-10 13:57 ` Segher Boessenkool
2007-07-11 7:17 ` Zhang Wei-r63237
2007-07-10 14:01 ` [PATCH 1/4] Add DMA sector to Documentation/powerpc/booting-without-of.txt file Segher Boessenkool
2007-07-10 16:11 ` Scott Wood
2007-07-11 10:00 ` Zhang Wei-r63237
2007-07-11 15:23 ` Scott Wood
2007-07-11 17:53 ` Segher Boessenkool
2007-07-12 9:48 ` Zhang Wei-r63237
2007-07-12 17:12 ` Phil Terry
2007-07-12 19:10 ` Scott Wood
2007-07-16 14:56 ` Segher Boessenkool
2007-07-16 14:54 ` Segher Boessenkool
2007-07-17 11:17 ` Paul Mackerras
2007-07-17 15:36 ` Segher Boessenkool
2007-07-11 11:18 ` Segher Boessenkool
2007-07-11 15:30 ` Scott Wood
2007-07-11 18:01 ` Segher Boessenkool
2007-07-11 18:18 ` Scott Wood [this message]
2007-07-11 18:43 ` Segher Boessenkool
2007-07-11 19:03 ` Scott Wood
2007-07-11 19:19 ` Segher Boessenkool
2007-07-11 19:27 ` Scott Wood
2007-07-11 20:27 ` Segher Boessenkool
2007-07-11 10:06 ` Zhang Wei-r63237
2007-07-11 11:40 ` Segher Boessenkool
2007-07-12 9:45 ` Zhang Wei-r63237
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=46951EE0.6040603@freescale.com \
--to=scottwood@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
--cc=segher@kernel.crashing.org \
/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).