These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / arch / sh / include / asm / dma-mapping.h
1 #ifndef __ASM_SH_DMA_MAPPING_H
2 #define __ASM_SH_DMA_MAPPING_H
3
4 extern struct dma_map_ops *dma_ops;
5 extern void no_iommu_init(void);
6
7 static inline struct dma_map_ops *get_dma_ops(struct device *dev)
8 {
9         return dma_ops;
10 }
11
12 #define DMA_ERROR_CODE 0
13
14 #include <asm-generic/dma-mapping-common.h>
15
16 void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
17                     enum dma_data_direction dir);
18
19 /* arch/sh/mm/consistent.c */
20 extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,
21                                         dma_addr_t *dma_addr, gfp_t flag,
22                                         struct dma_attrs *attrs);
23 extern void dma_generic_free_coherent(struct device *dev, size_t size,
24                                       void *vaddr, dma_addr_t dma_handle,
25                                       struct dma_attrs *attrs);
26
27 #endif /* __ASM_SH_DMA_MAPPING_H */