aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/dma-mapping.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-07-04 03:32:21 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-07-04 03:39:55 -0400
commit0703ed2a6b260cd743adf49a8281eb064d728832 (patch)
tree95740f9e1beb8901f163c7168b3e2666eb2158c9 /arch/arm/include/asm/dma-mapping.h
parentc289b2e0ccff1142908e20398930dc2e14697e74 (diff)
ARM: dmabounce: get rid of dma_needs_bounce global function
Pass the device type specific needs_bounce function in at dmabounce register time, avoiding the need for a platform specific global function to do this. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/dma-mapping.h')
-rw-r--r--arch/arm/include/asm/dma-mapping.h22
1 files changed, 2 insertions, 20 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index d2903d0c3085..4ad25337f927 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -256,14 +256,14 @@ int dma_mmap_writecombine(struct device *, struct vm_area_struct *,
256 * @dev: valid struct device pointer 256 * @dev: valid struct device pointer
257 * @small_buf_size: size of buffers to use with small buffer pool 257 * @small_buf_size: size of buffers to use with small buffer pool
258 * @large_buf_size: size of buffers to use with large buffer pool (can be 0) 258 * @large_buf_size: size of buffers to use with large buffer pool (can be 0)
259 * @needs_bounce_fn: called to determine whether buffer needs bouncing
259 * 260 *
260 * This function should be called by low-level platform code to register 261 * This function should be called by low-level platform code to register
261 * a device as requireing DMA buffer bouncing. The function will allocate 262 * a device as requireing DMA buffer bouncing. The function will allocate
262 * appropriate DMA pools for the device. 263 * appropriate DMA pools for the device.
263 *
264 */ 264 */
265extern int dmabounce_register_dev(struct device *, unsigned long, 265extern int dmabounce_register_dev(struct device *, unsigned long,
266 unsigned long); 266 unsigned long, int (*)(struct device *, dma_addr_t, size_t));
267 267
268/** 268/**
269 * dmabounce_unregister_dev 269 * dmabounce_unregister_dev
@@ -277,24 +277,6 @@ extern int dmabounce_register_dev(struct device *, unsigned long,
277 */ 277 */
278extern void dmabounce_unregister_dev(struct device *); 278extern void dmabounce_unregister_dev(struct device *);
279 279
280/**
281 * dma_needs_bounce
282 *
283 * @dev: valid struct device pointer
284 * @dma_handle: dma_handle of unbounced buffer
285 * @size: size of region being mapped
286 *
287 * Platforms that utilize the dmabounce mechanism must implement
288 * this function.
289 *
290 * The dmabounce routines call this function whenever a dma-mapping
291 * is requested to determine whether a given buffer needs to be bounced
292 * or not. The function must return 0 if the buffer is OK for
293 * DMA access and 1 if the buffer needs to be bounced.
294 *
295 */
296extern int dma_needs_bounce(struct device*, dma_addr_t, size_t);
297
298/* 280/*
299 * The DMA API, implemented by dmabounce.c. See below for descriptions. 281 * The DMA API, implemented by dmabounce.c. See below for descriptions.
300 */ 282 */