David Brownell <[email protected]> writes:

> From: David Brownell <[email protected]>
>
> Remove dm6446-specific SRAM allocator, as preparation for a
> more generic replacement.
>
> Signed-off-by: David Brownell <[email protected]>

Thanks, pushing this series of 3 patches today.

Kevin

> ---
> Nothing in-kernel uses this...
>
>  arch/arm/mach-davinci/Makefile              |    2 
>  arch/arm/mach-davinci/include/mach/edma.h   |    4 -
>  arch/arm/mach-davinci/include/mach/memory.h |    1 
>  arch/arm/mach-davinci/iram.c                |   58 --------------------------
>  4 files changed, 1 insertion(+), 64 deletions(-)
>
> --- a/arch/arm/mach-davinci/Makefile
> +++ b/arch/arm/mach-davinci/Makefile
> @@ -5,7 +5,7 @@
>  
>  # Common objects
>  obj-y                        := time.o clock.o serial.o io.o psc.o \
> -                        gpio.o devices.o usb.o dma.o iram.o common.o
> +                        gpio.o devices.o usb.o dma.o common.o
>  
>  obj-$(CONFIG_DAVINCI_MUX)            += mux.o
>  
> --- a/arch/arm/mach-davinci/include/mach/edma.h
> +++ b/arch/arm/mach-davinci/include/mach/edma.h
> @@ -209,10 +209,6 @@ void edma_clear_event(unsigned channel);
>  void edma_pause(unsigned channel);
>  void edma_resume(unsigned channel);
>  
> -/* UNRELATED TO DMA */
> -int davinci_alloc_iram(unsigned size);
> -void davinci_free_iram(unsigned addr, unsigned size);
> -
>  /* platform_data for EDMA driver */
>  struct edma_soc_info {
>  
> --- a/arch/arm/mach-davinci/include/mach/memory.h
> +++ b/arch/arm/mach-davinci/include/mach/memory.h
> @@ -21,7 +21,6 @@
>   * Definitions
>   **************************************************************************/
>  #define DAVINCI_DDR_BASE    0x80000000
> -#define DAVINCI_IRAM_BASE   0x00008000 /* ARM Internal RAM */
>  
>  #define PHYS_OFFSET DAVINCI_DDR_BASE
>  
> --- a/arch/arm/mach-davinci/iram.c
> +++ /dev/null
> @@ -1,58 +0,0 @@
> -/*
> - * linux/arch/arm/mach-davinci/iram.c
> - *
> - * DaVinci iram allocation/free
> - * Copyright (C) 2008 Boundary Devices.
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License as published by
> - * the Free Software Foundation; either version 2 of the License, or
> - * (at your option) any later version.
> - */
> -#include <linux/module.h>
> -#include <linux/kernel.h>
> -#include <linux/init.h>
> -#include <mach/memory.h>
> -
> -/*
> - * 2**14 (16K) / 2**5 (32) = 2**9 (512 bytes per bit)
> - */
> -static atomic_t iram_mask;
> -int davinci_alloc_iram(unsigned size)
> -{
> -     unsigned int mask;
> -     unsigned int mask_prior;
> -     unsigned addr;
> -     unsigned cnt;
> -     cnt = (size + 511) >> 9;
> -     if (cnt >= 32)
> -             return 0;
> -     mask = atomic_read(&iram_mask);
> -     do {
> -             unsigned int need_mask = (1 << cnt) - 1;
> -             addr = DAVINCI_IRAM_BASE;
> -             while (mask & need_mask) {
> -                     if (need_mask & (1<<31))
> -                             return -ENOMEM;
> -                     need_mask <<= 1;
> -                     addr += 512;
> -             }
> -             mask_prior = mask;
> -             mask = atomic_cmpxchg(&iram_mask, mask, mask | need_mask);
> -     } while (mask != mask_prior);
> -     return addr;
> -}
> -EXPORT_SYMBOL(davinci_alloc_iram);
> -
> -void davinci_free_iram(unsigned addr, unsigned size)
> -{
> -     unsigned mask;
> -     addr -= DAVINCI_IRAM_BASE;
> -     addr >>= 9;
> -     size = (size + 511) >> 9;
> -     if ((size + addr) >= 32)
> -             return;
> -     mask = ((1 << size) - 1) << addr;
> -     atomic_clear_mask(mask, (unsigned long *)&iram_mask.counter);
> -}
> -EXPORT_SYMBOL(davinci_free_iram);
>
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to