blk: rq_data_dir() should not return a boolean
[cris-mirror.git] / arch / mips / include / asm / dma-mapping.h
blobe604f760c4a076b44255b312b6f45180f06200c4
1 #ifndef _ASM_DMA_MAPPING_H
2 #define _ASM_DMA_MAPPING_H
4 #include <linux/scatterlist.h>
5 #include <asm/dma-coherence.h>
6 #include <asm/cache.h>
8 #ifndef CONFIG_SGI_IP27 /* Kludge to fix 2.6.39 build for IP27 */
9 #include <dma-coherence.h>
10 #endif
12 extern struct dma_map_ops *mips_dma_map_ops;
14 static inline struct dma_map_ops *get_dma_ops(struct device *dev)
16 if (dev && dev->archdata.dma_ops)
17 return dev->archdata.dma_ops;
18 else
19 return mips_dma_map_ops;
22 static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
24 if (!dev->dma_mask)
25 return false;
27 return addr + size <= *dev->dma_mask;
30 static inline void dma_mark_clean(void *addr, size_t size) {}
32 #include <asm-generic/dma-mapping-common.h>
34 extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
35 enum dma_data_direction direction);
37 #endif /* _ASM_DMA_MAPPING_H */