On Fri, Jun 21, 2013 at 09:17:59AM +0200, Marek Szyprowski wrote:
Using DMA attributes for this seems to be a bad idea. The dma direction parameter is much more appropriate. Will Deacon recently posted a patch which does it right, see:
https://git.linaro.org/gitweb?p=people/mszyprowski/linux-dma-mapping.git%3Ba...
Agreed, that is one usecase the dma-direction parameter was made for. In particular:
DMA_FROM_DEVICE -> Write only mapping DMA_TO_DEVICE -> Read only mapping DMA_BIDIRECTIONAL -> Read/Write mapping
So no need to use the dma attributes for that.
Joerg