Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5e95320f authored by Robin Getz's avatar Robin Getz Committed by Bryan Wu
Browse files

Blackfin arch: rename blackfin_sram.c to sram-alloc.c



rename blackfin_sram.c to sram-alloc.c (we know it is a blackfin file,
since it is in arch/blackfin) - and there is no "driver" code in there,
it is just an allocator/deallocator for L1 and L2 sram.

Also fix a problem that checkpatch pointed out

Signed-off-by: default avatarRobin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: default avatarBryan Wu <cooloney@kernel.org>
parent 763e63c6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@
# arch/blackfin/mm/Makefile
#

obj-y := blackfin_sram.o init.o
obj-y := sram-alloc.o init.o
+17 −14
Original line number Diff line number Diff line
/*
 * File:         arch/blackfin/mm/blackfin_sram.c
 * File:         arch/blackfin/mm/sram-alloc.c
 * Based on:
 * Author:
 *
 * Created:
 * Description:  SRAM driver for Blackfin ADSP-BF5xx
 * Description:  SRAM allocator for Blackfin L1 and L2 memory
 *
 * Modified:
 *               Copyright 2004-2007 Analog Devices Inc.
 *               Copyright 2004-2008 Analog Devices Inc.
 *
 * Bugs:         Enter bugs at http://blackfin.uclinux.org/
 *
@@ -78,7 +78,7 @@ static void __init l1sram_init(void)
	free_l1_ssram_head.next =
		kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
	if (!free_l1_ssram_head.next) {
		printk(KERN_INFO"Fail to initialize Scratchpad data SRAM.\n");
		printk(KERN_INFO "Failed to initialize Scratchpad data SRAM\n");
		return;
	}

@@ -102,7 +102,7 @@ static void __init l1_data_sram_init(void)
	free_l1_data_A_sram_head.next =
		kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
	if (!free_l1_data_A_sram_head.next) {
		printk(KERN_INFO"Fail to initialize L1 Data A SRAM.\n");
		printk(KERN_INFO "Failed to initialize L1 Data A SRAM\n");
		return;
	}

@@ -123,7 +123,7 @@ static void __init l1_data_sram_init(void)
	free_l1_data_B_sram_head.next =
		kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
	if (!free_l1_data_B_sram_head.next) {
		printk(KERN_INFO"Fail to initialize L1 Data B SRAM.\n");
		printk(KERN_INFO "Failed to initialize L1 Data B SRAM\n");
		return;
	}

@@ -151,7 +151,7 @@ static void __init l1_inst_sram_init(void)
	free_l1_inst_sram_head.next =
		kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
	if (!free_l1_inst_sram_head.next) {
		printk(KERN_INFO"Fail to initialize L1 Instruction SRAM.\n");
		printk(KERN_INFO "Failed to initialize L1 Instruction SRAM\n");
		return;
	}

@@ -179,7 +179,7 @@ static void __init l2_sram_init(void)
	free_l2_sram_head.next =
		kmem_cache_alloc(sram_piece_cache, GFP_KERNEL);
	if (!free_l2_sram_head.next) {
		printk(KERN_INFO"Fail to initialize L2 SRAM.\n");
		printk(KERN_INFO "Failed to initialize L2 SRAM\n");
		return;
	}

@@ -351,28 +351,31 @@ static int _sram_free(const void *addr,

int sram_free(const void *addr)
{
	if (0) {}

#if L1_CODE_LENGTH != 0
	else if (addr >= (void *)L1_CODE_START
	if (addr >= (void *)L1_CODE_START
		 && addr < (void *)(L1_CODE_START + L1_CODE_LENGTH))
		return l1_inst_sram_free(addr);
	else
#endif
#if L1_DATA_A_LENGTH != 0
	else if (addr >= (void *)L1_DATA_A_START
	if (addr >= (void *)L1_DATA_A_START
		 && addr < (void *)(L1_DATA_A_START + L1_DATA_A_LENGTH))
		return l1_data_A_sram_free(addr);
	else
#endif
#if L1_DATA_B_LENGTH != 0
	else if (addr >= (void *)L1_DATA_B_START
	if (addr >= (void *)L1_DATA_B_START
		 && addr < (void *)(L1_DATA_B_START + L1_DATA_B_LENGTH))
		return l1_data_B_sram_free(addr);
	else
#endif
#if L2_LENGTH != 0
	else if (addr >= (void *)L2_START
	if (addr >= (void *)L2_START
		 && addr < (void *)(L2_START + L2_LENGTH))
		return l2_sram_free(addr);
#endif
	else
#endif
		return -1;
}
EXPORT_SYMBOL(sram_free);