blob: 17a2cb5a4178ba6d99a1f2d5c56b6deaf5525fa3 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#ifndef _ASM_DMA_MAPPING_H
2#define _ASM_DMA_MAPPING_H
3
4#include <asm/scatterlist.h>
5
6static inline int
7dma_supported(struct device *dev, u64 mask)
8{
9 BUG();
10 return(0);
11}
12
13static inline int
14dma_set_mask(struct device *dev, u64 dma_mask)
15{
16 BUG();
17 return(0);
18}
19
20static inline void *
21dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle,
Al Viro970a9e72005-10-21 03:21:53 -040022 gfp_t flag)
Linus Torvalds1da177e2005-04-16 15:20:36 -070023{
24 BUG();
25 return((void *) 0);
26}
27
28static inline void
29dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
30 dma_addr_t dma_handle)
31{
32 BUG();
33}
34
35static inline dma_addr_t
36dma_map_single(struct device *dev, void *cpu_addr, size_t size,
37 enum dma_data_direction direction)
38{
39 BUG();
40 return(0);
41}
42
43static inline void
44dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
45 enum dma_data_direction direction)
46{
47 BUG();
48}
49
50static inline dma_addr_t
51dma_map_page(struct device *dev, struct page *page,
52 unsigned long offset, size_t size,
53 enum dma_data_direction direction)
54{
55 BUG();
56 return(0);
57}
58
59static inline void
60dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
61 enum dma_data_direction direction)
62{
63 BUG();
64}
65
66static inline int
67dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
68 enum dma_data_direction direction)
69{
70 BUG();
71 return(0);
72}
73
74static inline void
75dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
76 enum dma_data_direction direction)
77{
78 BUG();
79}
80
81static inline void
Paul Menageab420e62009-06-25 00:17:15 -070082dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
Linus Torvalds1da177e2005-04-16 15:20:36 -070083 enum dma_data_direction direction)
84{
85 BUG();
86}
87
88static inline void
Paul Menageab420e62009-06-25 00:17:15 -070089dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
Linus Torvalds1da177e2005-04-16 15:20:36 -070090 enum dma_data_direction direction)
91{
92 BUG();
93}
94
95#define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f)
96#define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h)
Linus Torvalds1da177e2005-04-16 15:20:36 -070097
98static inline int
99dma_get_cache_alignment(void)
100{
101 BUG();
102 return(0);
103}
104
105static inline void
Ralf Baechled3fa72e2006-12-06 20:38:56 -0800106dma_cache_sync(struct device *dev, void *vaddr, size_t size,
Linus Torvalds1da177e2005-04-16 15:20:36 -0700107 enum dma_data_direction direction)
108{
109 BUG();
110}
111
David S. Miller02a14162008-09-19 12:44:54 -0700112static inline int
113dma_mapping_error(struct device *dev, dma_addr_t dma_handle)
114{
115 BUG();
116 return 0;
117}
118
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119#endif