blob: a3745a3fe0290896a2a14450e6e47e8caf30a793 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef __ASM_SH_DMA_MAPPING_H
2#define __ASM_SH_DMA_MAPPING_H
3
Paul Mundt73c926b2009-10-20 12:55:56 +09004extern struct dma_map_ops *dma_ops;
5extern void no_iommu_init(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -07006
Paul Mundt73c926b2009-10-20 12:55:56 +09007static inline struct dma_map_ops *get_dma_ops(struct device *dev)
8{
9 return dma_ops;
10}
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Christoph Hellwigefa21e42015-09-09 15:39:46 -070012#define DMA_ERROR_CODE 0
13
Paul Mundtf32154c92009-10-26 09:50:51 +090014#include <asm-generic/dma-mapping-common.h>
15
Magnus Dammf93e97e2008-01-24 18:35:10 +090016void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
17 enum dma_data_direction dir);
Linus Torvalds1da177e2005-04-16 15:20:36 -070018
Paul Mundtf32154c92009-10-26 09:50:51 +090019/* arch/sh/mm/consistent.c */
20extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,
Andrzej Pietrasiewicz552c0d32011-12-14 12:11:13 +010021 dma_addr_t *dma_addr, gfp_t flag,
22 struct dma_attrs *attrs);
Paul Mundtf32154c92009-10-26 09:50:51 +090023extern void dma_generic_free_coherent(struct device *dev, size_t size,
Andrzej Pietrasiewicz552c0d32011-12-14 12:11:13 +010024 void *vaddr, dma_addr_t dma_handle,
25 struct dma_attrs *attrs);
Magnus Dammf93e97e2008-01-24 18:35:10 +090026
Linus Torvalds1da177e2005-04-16 15:20:36 -070027#endif /* __ASM_SH_DMA_MAPPING_H */