summaryrefslogtreecommitdiffstats
path: root/arch/avr32/include
diff options
context:
space:
mode:
authorAndreas Bießmann <andreas.devel@googlemail.com>2015-02-06 23:06:39 +0100
committerAndreas Bießmann <andreas.devel@googlemail.com>2015-02-17 22:52:39 +0100
commitdbdb5abd070163f59901884c672b49c25b1aeea9 (patch)
tree10dbb1e6358d178953613d5b08daba9958df03a6 /arch/avr32/include
parent5745f8c4fd5807becf7f246625e153388293aedc (diff)
downloadblackbird-obmc-uboot-dbdb5abd070163f59901884c672b49c25b1aeea9.tar.gz
blackbird-obmc-uboot-dbdb5abd070163f59901884c672b49c25b1aeea9.zip
avr32: use dlmalloc for DMA buffers
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'arch/avr32/include')
-rw-r--r--arch/avr32/include/asm/dma-mapping.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/avr32/include/asm/dma-mapping.h b/arch/avr32/include/asm/dma-mapping.h
index dbdd2fee38..1cde8275f4 100644
--- a/arch/avr32/include/asm/dma-mapping.h
+++ b/arch/avr32/include/asm/dma-mapping.h
@@ -14,7 +14,12 @@ enum dma_data_direction {
DMA_TO_DEVICE = 1,
DMA_FROM_DEVICE = 2,
};
-extern void *dma_alloc_coherent(size_t len, unsigned long *handle);
+
+static inline void *dma_alloc_coherent(size_t len, unsigned long *handle)
+{
+ *handle = (unsigned long)memalign(ARCH_DMA_MINALIGN, len);
+ return (void *)*handle;
+}
static inline unsigned long dma_map_single(volatile void *vaddr, size_t len,
enum dma_data_direction dir)
OpenPOWER on IntegriCloud