[PATCH 2/6] dma: mxs-dma: let dma_is_apbh and apbh_is_old take parameter

Shawn Guo shawn.guo at linaro.org
Wed May 9 05:32:07 EDT 2012


On 9 May 2012 17:16, Marek Vasut <marex at denx.de> wrote:
> Yep, I'm on the same boat with you. Check Shawn's reply to my mail, carrying the
> same concern. Well ... Shawn, I guess now that we're two, you better make
> another set of macros ;-)
>
I still do not think we need to necessarily have another set of
macros.  I would take your suggestion to add a comment there.

/*
 * The offset of NXTCMDAR register is different per both dma type and version,
 * while stride for each channel is all the same 0x70.
 */
#define HW_APBHX_CHn_NXTCMDAR(d, n) \
        (((dma_is_apbh(d) && apbh_is_old(d)) ? 0x050 : 0x110) + (n) * 0x70)
#define HW_APBHX_CHn_SEMA(d, n) \
        (((dma_is_apbh(d) && apbh_is_old(d)) ? 0x080 : 0x140) + (n) * 0x70)

Regards,
Shawn



More information about the linux-arm-kernel mailing list