summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/dma-mapping.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-06-15 13:08:50 +0200
committerPaul Burton <paul.burton@mips.com>2018-06-24 09:27:27 -0700
commitc5e2bbb45d28d53d278f25068142a283a0a74f7a (patch)
tree9527bd52fc31b960b1a969e9f4c0a535d17ee8f7 /arch/mips/include/asm/dma-mapping.h
parentd1f2564a5639bb54493eaa313aef612aee47ba7c (diff)
MIPS: jazz: split dma mapping operations from dma-default
Jazz actually has a very basic IOMMU, so split the ops into a separate implementation from the generic default support (which is about to go away anyway). Signed-off-by: Christoph Hellwig <hch@lst.de> Patchwork: https://patchwork.linux-mips.org/patch/19548/ Signed-off-by: Paul Burton <paul.burton@mips.com> Cc: Florian Fainelli <f.fainelli@gmail.com> Cc: David Daney <david.daney@cavium.com> Cc: Kevin Cernekee <cernekee@gmail.com> Cc: Jiaxun Yang <jiaxun.yang@flygoat.com> Cc: Tom Bogendoerfer <tsbogend@alpha.franken.de> Cc: Huacai Chen <chenhc@lemote.com> Cc: iommu@lists.linux-foundation.org Cc: linux-mips@linux-mips.org
Diffstat (limited to 'arch/mips/include/asm/dma-mapping.h')
-rw-r--r--arch/mips/include/asm/dma-mapping.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h
index e32a7b439816..caf97f739897 100644
--- a/arch/mips/include/asm/dma-mapping.h
+++ b/arch/mips/include/asm/dma-mapping.h
@@ -10,12 +10,15 @@
#include <dma-coherence.h>
#endif
+extern const struct dma_map_ops jazz_dma_ops;
extern const struct dma_map_ops mips_default_dma_map_ops;
extern const struct dma_map_ops mips_swiotlb_ops;
static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
{
-#ifdef CONFIG_SWIOTLB
+#if defined(CONFIG_MACH_JAZZ)
+ return &jazz_dma_ops;
+#elif defined(CONFIG_SWIOTLB)
return &mips_swiotlb_ops;
#elif defined(CONFIG_MIPS_DMA_DEFAULT)
return &mips_default_dma_map_ops;