dma-mapping.h 700 B

123456789101112131415161718192021222324252627282930
  1. #ifndef _ASM_M32R_DMA_MAPPING_H
  2. #define _ASM_M32R_DMA_MAPPING_H
  3. #include <linux/kernel.h>
  4. #include <linux/types.h>
  5. #include <linux/mm.h>
  6. #include <linux/scatterlist.h>
  7. #include <linux/dma-debug.h>
  8. #include <linux/io.h>
  9. #define DMA_ERROR_CODE (~(dma_addr_t)0x0)
  10. static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
  11. {
  12. return &dma_noop_ops;
  13. }
  14. static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
  15. enum dma_data_direction direction)
  16. {
  17. }
  18. static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
  19. {
  20. if (!dev->dma_mask)
  21. return false;
  22. return addr + size - 1 <= *dev->dma_mask;
  23. }
  24. #endif /* _ASM_M32R_DMA_MAPPING_H */