summaryrefslogtreecommitdiff
path: root/arch/arm64/include/asm/dma-mapping.h
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2015-10-01 20:14:00 +0100
committerJoerg Roedel <jroedel@suse.de>2015-10-15 16:41:47 +0200
commit876945dbf6497c7539ef958fee7ade970fbbe17a (patch)
tree249ed5cde4c8ed71361a50f75f28091e3c281adf /arch/arm64/include/asm/dma-mapping.h
parent13b8629f651164d71f4d38b821925f93ba4236c8 (diff)
arm64: Hook up IOMMU dma_ops
With iommu_dma_ops in place, hook them up to the configuration code, so IOMMU-fronted devices will get them automatically. Acked-by: Catalin Marinas <catalin.marinas@arm.com> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'arch/arm64/include/asm/dma-mapping.h')
-rw-r--r--arch/arm64/include/asm/dma-mapping.h15
1 files changed, 7 insertions, 8 deletions
diff --git a/arch/arm64/include/asm/dma-mapping.h b/arch/arm64/include/asm/dma-mapping.h
index cfdb34bedbcd..54d0ead41afc 100644
--- a/arch/arm64/include/asm/dma-mapping.h
+++ b/arch/arm64/include/asm/dma-mapping.h
@@ -54,16 +54,15 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
return __generic_dma_ops(dev);
}
-static inline void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
- struct iommu_ops *iommu, bool coherent)
-{
- if (!acpi_disabled && !dev->archdata.dma_ops)
- dev->archdata.dma_ops = dma_ops;
-
- dev->archdata.dma_coherent = coherent;
-}
+void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
+ struct iommu_ops *iommu, bool coherent);
#define arch_setup_dma_ops arch_setup_dma_ops
+#ifdef CONFIG_IOMMU_DMA
+void arch_teardown_dma_ops(struct device *dev);
+#define arch_teardown_dma_ops arch_teardown_dma_ops
+#endif
+
/* do not use this function in a driver */
static inline bool is_device_dma_coherent(struct device *dev)
{