diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-07-02 10:59:22 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-07-02 10:59:22 +0200 |
commit | dd3c898d06a55a4c6fe94dae3f732a541e983432 (patch) | |
tree | 9f8ea0b057a6a1b52c948214d27ccde9378326a9 /arch/arm/include/asm/mmu.h | |
parent | 649f558483f9959c0ac4123da8c7b647d9808be5 (diff) | |
parent | 40faf584cd60c1e0e083ac75eb9ef5f9e7c071d0 (diff) | |
download | barebox-dd3c898d06a55a4c6fe94dae3f732a541e983432.tar.gz barebox-dd3c898d06a55a4c6fe94dae3f732a541e983432.tar.xz |
Merge branch 'for-next/dma-cache-align'
Diffstat (limited to 'arch/arm/include/asm/mmu.h')
-rw-r--r-- | arch/arm/include/asm/mmu.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h index f5ae7a823a..a66da8c0a8 100644 --- a/arch/arm/include/asm/mmu.h +++ b/arch/arm/include/asm/mmu.h @@ -1,9 +1,12 @@ #ifndef __ASM_MMU_H #define __ASM_MMU_H -#include <asm/pgtable.h> -#include <malloc.h> +#include <common.h> #include <errno.h> +#include <malloc.h> +#include <xfuncs.h> + +#include <asm/pgtable.h> #define PMD_SECT_DEF_UNCACHED (PMD_SECT_AP_WRITE | PMD_SECT_AP_READ | PMD_TYPE_SECT) #define PMD_SECT_DEF_CACHED (PMD_SECT_WB | PMD_SECT_DEF_UNCACHED) @@ -23,6 +26,12 @@ static inline void setup_dma_coherent(unsigned long offset) { } +#define dma_alloc dma_alloc +static inline void *dma_alloc(size_t size) +{ + return xmemalign(64, ALIGN(size, 64)); +} + #ifdef CONFIG_MMU void *dma_alloc_coherent(size_t size); void dma_free_coherent(void *mem, size_t size); |