1 /* Public domain. */ 2 3 #ifndef _LINUX_DMA_MAPPING_H 4 #define _LINUX_DMA_MAPPING_H 5 6 #include <linux/sizes.h> 7 #include <linux/scatterlist.h> 8 #include <linux/dma-direction.h> 9 10 struct device; 11 12 #define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : (1ULL<<(n)) -1) 13 14 static inline int 15 dma_set_coherent_mask(struct device *dev, uint64_t m) 16 { 17 return 0; 18 } 19 20 static inline int 21 dma_set_max_seg_size(struct device *dev, unsigned int sz) 22 { 23 return 0; 24 } 25 26 static inline int 27 dma_set_mask(struct device *dev, uint64_t m) 28 { 29 return 0; 30 } 31 32 static inline int 33 dma_set_mask_and_coherent(void *dev, uint64_t m) 34 { 35 return 0; 36 } 37 38 static inline bool 39 dma_addressing_limited(void *dev) 40 { 41 return false; 42 } 43 44 static inline dma_addr_t 45 dma_map_page(void *dev, struct vm_page *page, size_t offset, 46 size_t size, enum dma_data_direction dir) 47 { 48 return VM_PAGE_TO_PHYS(page); 49 } 50 51 static inline void 52 dma_unmap_page(void *dev, dma_addr_t addr, size_t size, 53 enum dma_data_direction dir) 54 { 55 } 56 57 static inline int 58 dma_mapping_error(void *dev, dma_addr_t addr) 59 { 60 return 0; 61 } 62 63 #endif 64