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

Segher Boessenkool segher at kernel.crashing.org
Wed Jul 11 21:18:57 EST 2007


>>> +    - compatible : Should be "fsl,mpc8xxx-dma"
>>
>> Should _include_, not should _be_.  And none of this xxx
>> business, of course.
>
> Especially since the 85xx/86xx version is not 100% compatible with the
> 83xx version.  How about fsl,mpc8349-dma and fsl,mpc8548-dma for  
> the two
> variants?

Fine with me.  Do put the exact model name in every .dts
file as well, e.g. for a hypothetical MPC8599:

	compatible = "fsl,mpc8599-dma", "fsl,mpc8548-dma";

so the kernel can match on the exact name if it needs a
quirk, but can use the more generic name otherwise.

>>> +    - extended : Set the DMA channel to work at extended chain  
>>> mode.
>>> +                 If not set, the DMA channel will work at basic
>>> +                 chain mode.
>>
>> Call it "extended-chain-mode", perhaps?
>
> Or don't call it anything.  The ability to do extended chain mode is
> implicit in being compatible with fsl,mpc8548-dma.

Right.  I'm not sure having the channels as separate subnodes
buys anything at all, btw.

>>> +    - reserved : Reserve the DMA channel to device.
>>
>> What does this do?  Reserve it for what device, and where?
>> The OS driver?
>
> 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.

> 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?


Segher




More information about the Linuxppc-dev mailing list