2 * PXA-specific dma_needs_bounce
4 * Some PXA platforms (h5400, eseries) have different requirements for DMA
5 * bouncing, so we define a dma_needs_bounce() that can call a
6 * platform-specific function set by pxa_set_dma_needs_bounce().
8 * Better would be to teach dmabounce.c to allow the dma_needs_bounce function
9 * to be set at run-time; this is just a stop-gap.
12 #include <linux/device.h>
13 #include <linux/dma-mapping.h>
15 static int (*dma_needs_bounce_p
)(struct device
*, dma_addr_t
, size_t) = NULL
;
18 pxa_set_dma_needs_bounce(void *needs_bounce_func
)
20 dma_needs_bounce_p
= needs_bounce_func
;
22 EXPORT_SYMBOL(pxa_set_dma_needs_bounce
);
25 dma_needs_bounce(struct device
*dev
, dma_addr_t addr
, size_t size
) {
27 return dma_needs_bounce_p
? dma_needs_bounce_p(dev
, addr
, size
) : 0;