]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - arch/alpha/include/asm/dma-mapping.h
dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}
[karo-tx-linux.git] / arch / alpha / include / asm / dma-mapping.h
1 #ifndef _ALPHA_DMA_MAPPING_H
2 #define _ALPHA_DMA_MAPPING_H
3
4 #include <linux/dma-attrs.h>
5
6 extern struct dma_map_ops *dma_ops;
7
8 static inline struct dma_map_ops *get_dma_ops(struct device *dev)
9 {
10         return dma_ops;
11 }
12
13 #include <asm-generic/dma-mapping-common.h>
14
15 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
16 {
17         return get_dma_ops(dev)->mapping_error(dev, dma_addr);
18 }
19
20 static inline int dma_supported(struct device *dev, u64 mask)
21 {
22         return get_dma_ops(dev)->dma_supported(dev, mask);
23 }
24
25 static inline int dma_set_mask(struct device *dev, u64 mask)
26 {
27         return get_dma_ops(dev)->set_dma_mask(dev, mask);
28 }
29
30 #define dma_alloc_noncoherent(d, s, h, f)       dma_alloc_coherent(d, s, h, f)
31 #define dma_free_noncoherent(d, s, v, h)        dma_free_coherent(d, s, v, h)
32
33 #define dma_cache_sync(dev, va, size, dir)                ((void)0)
34
35 #endif  /* _ALPHA_DMA_MAPPING_H */