Merge branches 'work.misc' and 'work.dcache' of git://git.kernel.org/pub/scm/linux...
[sfrench/cifs-2.6.git] / arch / mips / include / asm / dma-direct.h
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _MIPS_DMA_DIRECT_H
3 #define _MIPS_DMA_DIRECT_H 1
4
5 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
6 {
7         if (!dev->dma_mask)
8                 return false;
9
10         return addr + size - 1 <= *dev->dma_mask;
11 }
12
13 dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr);
14 phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t daddr);
15
16 #endif /* _MIPS_DMA_DIRECT_H */