Subject: Re: [PATCH 1/4] Add DMA sector to Documentation/powerpc/booting-without-of.txt file.

From: Scott Wood <[email-masked]>
Date: Wed, 11 Jul 2007 10:30:42 -0500

Segher Boessenkool wrote:
>> Some hardware has DMA channels hardwired to certain peripherals,  such as
>> an audio codec.  This keeps them from being used as general purpose  DMA
>> channels.
> 
> 
> I think you need this knowledge in the kernel drivers anyway,
> or at the very least, the device node for for example that
> audio codec needs to refer to the DMA channel in the device
> tree, so this "reserved" property is unnecessary.

The generic DMA driver needs to know not to touch the reserved channels.

>> I'd rather just treat the different DMA channels as independent  devices,
>> rather than children of a dma "bus", and change the compatible name if
>> they're not general purpose.  There's only one register that's shared
>> among the channels, and it's a superfluous status summary register.
> 
> If you make separate nodes for the channels, they need to have
> a parent.  I don't think it makes sense to have the channel
> nodes and the "master" node as siblings -- maybe it all should
> be just one node with a "#channels" property or such?

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 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, and the generic DMA driver will never see it unless 
the sound driver explicitly chooses to make use of the generic DMA code 
-- and most of the time I think it'd be simpler for the special-purpose 
driver to manage the descriptors itself.

-Scott