diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2006-06-25 05:07:52 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-06-26 02:15:05 -0400 |
commit | 36321426e320c2c6bc2f8a1587d6f4d695fca84c (patch) | |
tree | bf37ac9d3452d158929af4db0d3b6ab3d5a95b9b /include | |
parent | 987c74fcb7a4479a04c44745098089785c16f5fe (diff) |
[SPARC64]: Add missing interfaces to dma-mapping.h
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sparc64/dma-mapping.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/include/asm-sparc64/dma-mapping.h b/include/asm-sparc64/dma-mapping.h index 3c2b5bc8650b..0f5b89c9323b 100644 --- a/include/asm-sparc64/dma-mapping.h +++ b/include/asm-sparc64/dma-mapping.h | |||
@@ -162,4 +162,47 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
162 | 162 | ||
163 | #endif /* PCI */ | 163 | #endif /* PCI */ |
164 | 164 | ||
165 | |||
166 | /* Now for the API extensions over the pci_ one */ | ||
167 | |||
168 | #define dma_alloc_noncoherent(d, s, h, f) dma_alloc_coherent(d, s, h, f) | ||
169 | #define dma_free_noncoherent(d, s, v, h) dma_free_coherent(d, s, v, h) | ||
170 | #define dma_is_consistent(d) (1) | ||
171 | |||
172 | static inline int | ||
173 | dma_get_cache_alignment(void) | ||
174 | { | ||
175 | /* no easy way to get cache size on all processors, so return | ||
176 | * the maximum possible, to be safe */ | ||
177 | return (1 << INTERNODE_CACHE_SHIFT); | ||
178 | } | ||
179 | |||
180 | static inline void | ||
181 | dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle, | ||
182 | unsigned long offset, size_t size, | ||
183 | enum dma_data_direction direction) | ||
184 | { | ||
185 | /* just sync everything, that's all the pci API can do */ | ||
186 | dma_sync_single_for_cpu(dev, dma_handle, offset+size, direction); | ||
187 | } | ||
188 | |||
189 | static inline void | ||
190 | dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle, | ||
191 | unsigned long offset, size_t size, | ||
192 | enum dma_data_direction direction) | ||
193 | { | ||
194 | /* just sync everything, that's all the pci API can do */ | ||
195 | dma_sync_single_for_device(dev, dma_handle, offset+size, direction); | ||
196 | } | ||
197 | |||
198 | static inline void | ||
199 | dma_cache_sync(void *vaddr, size_t size, | ||
200 | enum dma_data_direction direction) | ||
201 | { | ||
202 | /* could define this in terms of the dma_cache ... operations, | ||
203 | * but if you get this on a platform, you should convert the platform | ||
204 | * to using the generic device DMA API */ | ||
205 | BUG(); | ||
206 | } | ||
207 | |||
165 | #endif /* _ASM_SPARC64_DMA_MAPPING_H */ | 208 | #endif /* _ASM_SPARC64_DMA_MAPPING_H */ |