ARM: dma-mapping: convert DMA direction into IOMMU protection attributes
authorWill Deacon <will.deacon@arm.com>
Mon, 10 Jun 2013 18:34:39 +0000 (19:34 +0100)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 28 Jun 2013 13:14:27 +0000 (15:14 +0200)
IOMMU mappings take a prot parameter, identifying the protection bits
to enforce on the newly created mapping (READ or WRITE). The ARM
dma-mapping framework currently just passes 0 as the prot argument,
resulting in faulting mappings.

This patch infers the protection attributes based on the direction of
the DMA transfer.

Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>

No differences found