[PATCH 4/7] ARM: pass size to dma_free_coherent
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Jul 29 07:14:28 EDT 2011
On 11:43 Fri 29 Jul , Sascha Hauer wrote:
> We'll need it later once we remap dma memory.
>
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> ---
> arch/arm/cpu/mmu.c | 2 +-
> arch/arm/include/asm/mmu.h | 9 +++++++--
> drivers/usb/gadget/fsl_udc.c | 2 +-
> 3 files changed, 9 insertions(+), 4 deletions(-)
>
> diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c
> index 8465d1a..bb067e3 100644
> --- a/arch/arm/cpu/mmu.c
> +++ b/arch/arm/cpu/mmu.c
> @@ -155,7 +155,7 @@ void *phys_to_virt(unsigned long phys)
> return (void *)(phys + dma_coherent_offset);
> }
>
> -void dma_free_coherent(void *mem)
> +void dma_free_coherent(void *mem, size_t size)
> {
> free(mem - dma_coherent_offset);
> }
> diff --git a/arch/arm/include/asm/mmu.h b/arch/arm/include/asm/mmu.h
> index d96c728..9ebc2cd 100644
> --- a/arch/arm/include/asm/mmu.h
> +++ b/arch/arm/include/asm/mmu.h
> @@ -17,7 +17,7 @@ void setup_dma_coherent(unsigned long offset);
>
> #ifdef CONFIG_MMU
> void *dma_alloc_coherent(size_t size);
> -void dma_free_coherent(void *mem);
> +void dma_free_coherent(void *mem, size_t size);
>
> void dma_clean_range(unsigned long, unsigned long);
> void dma_flush_range(unsigned long, unsigned long);
> @@ -26,12 +26,17 @@ unsigned long virt_to_phys(void *virt);
> void *phys_to_virt(unsigned long phys);
>
> #else
> +static inline int mmu_init(void)
> +{
> + return -EINVAL;
if not enable we just success no?
specially if the code is move out the board
Best Regards,
J.
More information about the barebox
mailing list