dma-mapping.h 804 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _ASM_S390_DMA_MAPPING_H
  2. #define _ASM_S390_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-attrs.h>
  8. #include <linux/dma-debug.h>
  9. #include <linux/io.h>
  10. #define DMA_ERROR_CODE (~(dma_addr_t) 0x0)
  11. extern struct dma_map_ops s390_dma_ops;
  12. static inline struct dma_map_ops *get_dma_ops(struct device *dev)
  13. {
  14. return &s390_dma_ops;
  15. }
  16. static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
  17. enum dma_data_direction direction)
  18. {
  19. }
  20. #include <asm-generic/dma-mapping-common.h>
  21. static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
  22. {
  23. if (!dev->dma_mask)
  24. return false;
  25. return addr + size - 1 <= *dev->dma_mask;
  26. }
  27. #endif /* _ASM_S390_DMA_MAPPING_H */