summaryrefslogtreecommitdiffstats
path: root/arch/mips/mm
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-01-07 13:36:20 -0500
committerChristoph Hellwig <hch@lst.de>2019-02-13 19:12:33 +0100
commit347cb6af8710b72cf9685fdc09d07873cf42d51f (patch)
tree37927e976037dcea2141aef10cba34efe58d2655 /arch/mips/mm
parent70ca7ba2dbe4f1858b85e30269c8408a8bb8f272 (diff)
downloadlinux-347cb6af8710b72cf9685fdc09d07873cf42d51f.tar.gz
linux-347cb6af8710b72cf9685fdc09d07873cf42d51f.tar.bz2
linux-347cb6af8710b72cf9685fdc09d07873cf42d51f.zip
dma-mapping: add a kconfig symbol for arch_setup_dma_ops availability
Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Paul Burton <paul.burton@mips.com> # MIPS Acked-by: Catalin Marinas <catalin.marinas@arm.com> # arm64
Diffstat (limited to 'arch/mips/mm')
-rw-r--r--arch/mips/mm/dma-noncoherent.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/mm/dma-noncoherent.c b/arch/mips/mm/dma-noncoherent.c
index cb38461391cb..0606fc87b294 100644
--- a/arch/mips/mm/dma-noncoherent.c
+++ b/arch/mips/mm/dma-noncoherent.c
@@ -159,3 +159,11 @@ void arch_dma_cache_sync(struct device *dev, void *vaddr, size_t size,
dma_sync_virt(vaddr, size, direction);
}
+
+#ifdef CONFIG_DMA_PERDEV_COHERENT
+void arch_setup_dma_ops(struct device *dev, u64 dma_base, u64 size,
+ const struct iommu_ops *iommu, bool coherent)
+{
+ dev->dma_coherent = coherent;
+}
+#endif