dma-direct.h 426 B

1234567891011121314151617
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _MIPS_DMA_DIRECT_H
  3. #define _MIPS_DMA_DIRECT_H 1
  4. static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
  5. {
  6. if (!dev->dma_mask)
  7. return false;
  8. return addr + size - 1 <= *dev->dma_mask;
  9. }
  10. dma_addr_t __phys_to_dma(struct device *dev, phys_addr_t paddr);
  11. phys_addr_t __dma_to_phys(struct device *dev, dma_addr_t daddr);
  12. #endif /* _MIPS_DMA_DIRECT_H */