]> git.baikalelectronics.ru Git - kernel.git/commit
arm: dma-mapping: Set DMA IOMMU ops in arm_iommu_attach_device()
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 23 Jan 2015 14:21:49 +0000 (16:21 +0200)
committerOlof Johansson <olof@lixom.net>
Thu, 29 Jan 2015 18:56:27 +0000 (10:56 -0800)
commit1ac1e831ffa48889d1a888a80c82c072e3a21d95
treef36e2bcb7d7627f265fa631993c9183f2059f5e4
parentde0f75c85027bb4dc386bd38c72a4ef53f8cdf65
arm: dma-mapping: Set DMA IOMMU ops in arm_iommu_attach_device()

Commit 77bfb650a1ca820d ("arm: dma-mapping: plumb our iommu mapping ops
into arch_setup_dma_ops") moved the setting of the DMA operations from
arm_iommu_attach_device() to arch_setup_dma_ops() where the DMA
operations to be used are selected based on whether the device is
connected to an IOMMU. However, the IOMMU detection scheme requires the
IOMMU driver to be ported to the new IOMMU of_xlate API. As no driver
has been ported yet, this effectively breaks all IOMMU ARM users that
depend on the IOMMU being handled transparently by the DMA mapping API.

Fix this by restoring the setting of DMA IOMMU ops in
arm_iommu_attach_device() and splitting the rest of the function into a
new internal __arm_iommu_attach_device() function, called by
arch_setup_dma_ops().

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
arch/arm/mm/dma-mapping.c