]> 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)
commit9ed27803767e6f65a3c5dc6c5f3a714b2bc1dba7
treef36e2bcb7d7627f265fa631993c9183f2059f5e4
parent13eb5acfd5962cb9dab2de5b980596b34f926c13
arm: dma-mapping: Set DMA IOMMU ops in arm_iommu_attach_device()

Commit 412082cf70b873a6 ("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