diff options
author | Andreas Bießmann <andreas.devel@googlemail.com> | 2015-02-06 23:06:39 +0100 |
---|---|---|
committer | Andreas Bießmann <andreas.devel@googlemail.com> | 2015-02-17 22:52:39 +0100 |
commit | dbdb5abd070163f59901884c672b49c25b1aeea9 (patch) | |
tree | 10dbb1e6358d178953613d5b08daba9958df03a6 /arch/avr32/include | |
parent | 5745f8c4fd5807becf7f246625e153388293aedc (diff) | |
download | u-boot-dbdb5abd070163f59901884c672b49c25b1aeea9.tar.gz |
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.h | 7 |
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) |