dma-mapping.h 801 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-debug.h>
  8. #include <linux/io.h>
  9. #define DMA_ERROR_CODE (~(dma_addr_t) 0x0)
  10. extern struct dma_map_ops s390_pci_dma_ops;
  11. static inline struct dma_map_ops *get_dma_ops(struct device *dev)
  12. {
  13. if (dev && dev->archdata.dma_ops)
  14. return dev->archdata.dma_ops;
  15. return &dma_noop_ops;
  16. }
  17. static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
  18. enum dma_data_direction direction)
  19. {
  20. }
  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 */