MIPS: DMA: Allow platforms to override only the post DMA hook
authorFlorian Fainelli <f.fainelli@gmail.com>
Tue, 7 Apr 2015 20:34:01 +0000 (13:34 -0700)
committerRalf Baechle <ralf@linux-mips.org>
Wed, 8 Apr 2015 21:52:33 +0000 (23:52 +0200)
Instead of having platforms to copy the entirety of
mach-generic/dma-coherence.h, check whether these platforms have already
defined a plat_post_dma_flush hook, and if not, provide an inline stub.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@linux-mips.org
Cc: cernekee@gmail.com
Cc: jogo@openwrt.org
Patchwork: https://patchwork.linux-mips.org/patch/9725/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
arch/mips/include/asm/mach-generic/dma-coherence.h

index 671330928e67679a5c3a3acee4facfa0a647e72c..0f8a354fd4686dc49cbd6718ef565e9b73786386 100644 (file)
@@ -52,9 +52,11 @@ static inline int plat_device_is_coherent(struct device *dev)
        return coherentio;
 }
 
+#ifndef plat_post_dma_flush
 static inline void plat_post_dma_flush(struct device *dev)
 {
 }
+#endif
 
 #ifdef CONFIG_SWIOTLB
 static inline dma_addr_t phys_to_dma(struct device *dev, phys_addr_t paddr)