Merge remote-tracking branch 'drm-tegra/drm/tegra/for-next'
[deliverable/linux.git] / arch / mips / include / asm / dma-mapping.h
CommitLineData
1da177e4
LT
1#ifndef _ASM_DMA_MAPPING_H
2#define _ASM_DMA_MAPPING_H
3
84be456f 4#include <linux/scatterlist.h>
b6d92b4a 5#include <asm/dma-coherence.h>
1da177e4
LT
6#include <asm/cache.h>
7
70342287 8#ifndef CONFIG_SGI_IP27 /* Kludge to fix 2.6.39 build for IP27 */
48e1fd5a 9#include <dma-coherence.h>
a5602a32 10#endif
1da177e4 11
48e1fd5a 12extern struct dma_map_ops *mips_dma_map_ops;
1da177e4 13
48e1fd5a
DD
14static inline struct dma_map_ops *get_dma_ops(struct device *dev)
15{
16 if (dev && dev->archdata.dma_ops)
17 return dev->archdata.dma_ops;
18 else
19 return mips_dma_map_ops;
20}
1da177e4 21
48e1fd5a
DD
22static inline bool dma_capable(struct device *dev, dma_addr_t addr, size_t size)
23{
24 if (!dev->dma_mask)
3db27425 25 return false;
1da177e4 26
48e1fd5a
DD
27 return addr + size <= *dev->dma_mask;
28}
29
30static inline void dma_mark_clean(void *addr, size_t size) {}
31
d3fa72e4 32extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
1da177e4
LT
33 enum dma_data_direction direction);
34
1da177e4 35#endif /* _ASM_DMA_MAPPING_H */
This page took 0.801171 seconds and 5 git commands to generate.