summaryrefslogtreecommitdiff
path: root/arch/mips/include/asm/mach-loongson64
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-06-15 13:08:36 +0200
committerPaul Burton <paul.burton@mips.com>2018-06-24 09:26:03 -0700
commitf6d302e33d68ddbaf99c774ed994599243462b24 (patch)
tree62aba80f4998764b95b5cf7d521bf44b6f9ba96f /arch/mips/include/asm/mach-loongson64
parente799de3efb9d6e0df5740eed901b89a6e533eaef (diff)
MIPS: consolidate the swiotlb implementations
Octeon and Loongson share exactly the same code, move it into a common implementation, and use that implementation directly from get_arch_dma_ops. Also provide the expected dma-direct.h helpers directly instead of delegating to platform dma-coherence.h headers. Signed-off-by: Christoph Hellwig <hch@lst.de> Patchwork: https://patchwork.linux-mips.org/patch/19534/ 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/mach-loongson64')
-rw-r--r--arch/mips/include/asm/mach-loongson64/dma-coherence.h10
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/mips/include/asm/mach-loongson64/dma-coherence.h b/arch/mips/include/asm/mach-loongson64/dma-coherence.h
index 64fc44dec0a8..b8825a7d1279 100644
--- a/arch/mips/include/asm/mach-loongson64/dma-coherence.h
+++ b/arch/mips/include/asm/mach-loongson64/dma-coherence.h
@@ -17,16 +17,6 @@
struct device;
-static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
-{
- if (!dev->dma_mask)
- return false;
-
- return addr + size - 1 <= *dev->dma_mask;
-}
-
-extern dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr);
-extern phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t daddr);
static inline dma_addr_t plat_map_dma_mem(struct device *dev, void *addr,
size_t size)
{