dma-mapping.h 753 B

1234567891011121314151617181920212223242526272829303132
  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-debug.h>
  8. #include <linux/io.h>
  9. #define DMA_ERROR_CODE (~(dma_addr_t) 0x0)
  10. extern const struct dma_map_ops s390_pci_dma_ops;
  11. static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus)
  12. {
  13. return &dma_noop_ops;
  14. }
  15. static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
  16. enum dma_data_direction direction)
  17. {
  18. }
  19. static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
  20. {
  21. if (!dev->dma_mask)
  22. return false;
  23. return addr + size - 1 <= *dev->dma_mask;
  24. }
  25. #endif /* _ASM_S390_DMA_MAPPING_H */