diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-16 18:20:36 -0400 |
commit | 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch) | |
tree | 0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-cris/dma-mapping.h |
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.
Let it rip!
Diffstat (limited to 'include/asm-cris/dma-mapping.h')
-rw-r--r-- | include/asm-cris/dma-mapping.h | 125 |
1 files changed, 125 insertions, 0 deletions
diff --git a/include/asm-cris/dma-mapping.h b/include/asm-cris/dma-mapping.h new file mode 100644 index 000000000000..0d770f60127a --- /dev/null +++ b/include/asm-cris/dma-mapping.h | |||
@@ -0,0 +1,125 @@ | |||
1 | #ifndef _ASM_CRIS_DMA_MAPPING_H | ||
2 | #define _ASM_CRIS_DMA_MAPPING_H | ||
3 | |||
4 | #include "scatterlist.h" | ||
5 | |||
6 | static inline int | ||
7 | dma_supported(struct device *dev, u64 mask) | ||
8 | { | ||
9 | BUG(); | ||
10 | return 0; | ||
11 | } | ||
12 | |||
13 | static inline int | ||
14 | dma_set_mask(struct device *dev, u64 dma_mask) | ||
15 | { | ||
16 | BUG(); | ||
17 | return 1; | ||
18 | } | ||
19 | |||
20 | static inline void * | ||
21 | dma_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, | ||
22 | int flag) | ||
23 | { | ||
24 | BUG(); | ||
25 | return NULL; | ||
26 | } | ||
27 | |||
28 | static inline void | ||
29 | dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, | ||
30 | dma_addr_t dma_handle) | ||
31 | { | ||
32 | BUG(); | ||
33 | } | ||
34 | |||
35 | static inline dma_addr_t | ||
36 | dma_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 | |||
43 | static inline void | ||
44 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | ||
45 | enum dma_data_direction direction) | ||
46 | { | ||
47 | BUG(); | ||
48 | } | ||
49 | |||
50 | static inline dma_addr_t | ||
51 | dma_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 | |||
59 | static inline void | ||
60 | dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, | ||
61 | enum dma_data_direction direction) | ||
62 | { | ||
63 | BUG(); | ||
64 | } | ||
65 | |||
66 | static inline int | ||
67 | dma_map_sg(struct device *dev, struct scatterlist *sg, int nents, | ||
68 | enum dma_data_direction direction) | ||
69 | { | ||
70 | BUG(); | ||
71 | return 1; | ||
72 | } | ||
73 | |||
74 | static inline void | ||
75 | dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, | ||
76 | enum dma_data_direction direction) | ||
77 | { | ||
78 | BUG(); | ||
79 | } | ||
80 | |||
81 | static inline void | ||
82 | dma_sync_single(struct device *dev, dma_addr_t dma_handle, size_t size, | ||
83 | enum dma_data_direction direction) | ||
84 | { | ||
85 | BUG(); | ||
86 | } | ||
87 | |||
88 | static inline void | ||
89 | dma_sync_sg(struct device *dev, struct scatterlist *sg, int nelems, | ||
90 | enum dma_data_direction direction) | ||
91 | { | ||
92 | BUG(); | ||
93 | } | ||
94 | |||
95 | /* Now for the API extensions over the pci_ one */ | ||
96 | |||
97 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
98 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
99 | #define dma_is_consistent(d) (1) | ||
100 | |||
101 | static inline int | ||
102 | dma_get_cache_alignment(void) | ||
103 | { | ||
104 | /* no easy way to get cache size on all processors, so return | ||
105 | * the maximum possible, to be safe */ | ||
106 | return (1 << L1_CACHE_SHIFT_MAX); | ||
107 | } | ||
108 | |||
109 | static inline void | ||
110 | dma_sync_single_range(struct device *dev, dma_addr_t dma_handle, | ||
111 | unsigned long offset, size_t size, | ||
112 | enum dma_data_direction direction) | ||
113 | { | ||
114 | BUG(); | ||
115 | } | ||
116 | |||
117 | static inline void | ||
118 | dma_cache_sync(void *vaddr, size_t size, | ||
119 | enum dma_data_direction direction) | ||
120 | { | ||
121 | BUG(); | ||
122 | } | ||
123 | |||
124 | #endif | ||
125 | |||