[PATCH 2/2] dma: imx-sdma: move to generic device tree bindings

Shawn Guo shawn.guo at linaro.org
Wed Apr 24 11:15:46 EDT 2013


On Wed, Apr 24, 2013 at 04:52:48PM +0200, Arnd Bergmann wrote:
> On Wednesday 24 April 2013, Shawn Guo wrote:
> > Using macros will help us to:
> > 
> > 1) Improve the readability of "dmas" property in dts
> > 2) Keep the values stay in sync between kernel and DT
> > 
> 
> I can understand the second part, but I strongly disagree on the first one.
> Using symbolic constants in the DT will make it harder to understand because
> you now have to look in multiple places to see what you actually put in there.

So for example below, I did not use macro for the first cell which is
the DMA request ID, because it's unique for each peripheral.  But
IMX_DMATYPE_SSI_SP will be applied on all 3 SSI controllers on imx51
for 6 times (rx and tx).

	dmas = <&sdma 24 IMX_DMATYPE_SSI_SP DMA_PRIO_HIGH>,
	       <&sdma 25 IMX_DMATYPE_SSI_SP DMA_PRIO_HIGH>;
	dma-names = "rx", "tx";

Shawn

> It makes some sense for the priorities, since they get reused for each
> dma specifier.




More information about the linux-arm-kernel mailing list