Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 113748
b: refs/heads/master
c: 5e95320
h: refs/heads/master
v: v3
  • Loading branch information
Robin Getz authored and Bryan Wu committed Oct 8, 2008
1 parent 323cc02 commit 1692527
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 763e63c640ae799e3ce6495e71832744bffc661b
refs/heads/master: 5e95320f9fb7a3171bb75eba15acb745c6e43805
2 changes: 1 addition & 1 deletion trunk/arch/blackfin/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# arch/blackfin/mm/Makefile
#

obj-y := blackfin_sram.o init.o
obj-y := sram-alloc.o init.o
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
* 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/
*
Expand Down Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand All @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 1692527

Please sign in to comment.