Re: [PATCH 06/10] MXS-DMA : add more flags for MXS-DMA

From: Huang Shijie
Date: Thu Jan 19 2012 - 04:30:01 EST


hi,
Err, the 'flags' argument to device_prep_slave_sg() is supposed to be
from the set of enum dma_ctrl_flags. What this means is that your
MXS_DMA_F_APPEND is equivalent to DMA_PREP_INTERRUPT, and
MXS_DMA_F_WAIT4END is equivalent to DMA_CTRL_ACK.

thanks a lot.
I will reuse the dma_ctrl_flags in the next version.
What this does is make your drivers completely dependent on your DMA
engine implementation. That's not a good idea when devices get
reused in different SoCs.

Frankly speaking, the APBH-DMA is more coupled with the GPMI then any other modules.
In the MX6Q, the GPMI is the ONLY user of APBH-DMA.
You even can see the NAND_LOCK bit in the DMA command structure which is only used by the GPMI
NAND controller,.


To Shawn & Wolfram:
thanks very much for your comments.

Best Regards
Huang Shijie

If you need to supply extra flags which aren't in the dma_ctrl_flags,
at least make sure that they're using different bits. For bonus points,
also have your driver_check_ the DMA engine it's connected to before
it passes these flags.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/