diff options
author | Robin Getz <rgetz@blackfin.uclinux.org> | 2008-10-08 05:22:49 -0400 |
---|---|---|
committer | Bryan Wu <cooloney@kernel.org> | 2008-10-08 05:22:49 -0400 |
commit | 5e95320f9fb7a3171bb75eba15acb745c6e43805 (patch) | |
tree | 5ba817608ad746e28a0ca7ec1b5ae420cdb01315 | |
parent | 763e63c640ae799e3ce6495e71832744bffc661b (diff) |
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: Robin Getz <rgetz@blackfin.uclinux.org>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
-rw-r--r-- | arch/blackfin/mm/Makefile | 2 | ||||
-rw-r--r-- | arch/blackfin/mm/sram-alloc.c (renamed from arch/blackfin/mm/blackfin_sram.c) | 31 |
2 files changed, 18 insertions, 15 deletions
diff --git a/arch/blackfin/mm/Makefile b/arch/blackfin/mm/Makefile index 2a7202ce01fd..81aacbc32d3c 100644 --- a/arch/blackfin/mm/Makefile +++ b/arch/blackfin/mm/Makefile | |||
@@ -2,4 +2,4 @@ | |||
2 | # arch/blackfin/mm/Makefile | 2 | # arch/blackfin/mm/Makefile |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-y := blackfin_sram.o init.o | 5 | obj-y := sram-alloc.o init.o |
diff --git a/arch/blackfin/mm/blackfin_sram.c b/arch/blackfin/mm/sram-alloc.c index 4f5e887a0d96..0f1ca6930c16 100644 --- a/arch/blackfin/mm/blackfin_sram.c +++ b/arch/blackfin/mm/sram-alloc.c | |||
@@ -1,13 +1,13 @@ | |||
1 | /* | 1 | /* |
2 | * File: arch/blackfin/mm/blackfin_sram.c | 2 | * File: arch/blackfin/mm/sram-alloc.c |
3 | * Based on: | 3 | * Based on: |
4 | * Author: | 4 | * Author: |
5 | * | 5 | * |
6 | * Created: | 6 | * Created: |
7 | * Description: SRAM driver for Blackfin ADSP-BF5xx | 7 | * Description: SRAM allocator for Blackfin L1 and L2 memory |
8 | * | 8 | * |
9 | * Modified: | 9 | * Modified: |
10 | * Copyright 2004-2007 Analog Devices Inc. | 10 | * Copyright 2004-2008 Analog Devices Inc. |
11 | * | 11 | * |
12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ | 12 | * Bugs: Enter bugs at http://blackfin.uclinux.org/ |
13 | * | 13 | * |
@@ -78,7 +78,7 @@ static void __init l1sram_init(void) | |||
78 | free_l1_ssram_head.next = | 78 | free_l1_ssram_head.next = |
79 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); | 79 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); |
80 | if (!free_l1_ssram_head.next) { | 80 | if (!free_l1_ssram_head.next) { |
81 | printk(KERN_INFO"Fail to initialize Scratchpad data SRAM.\n"); | 81 | printk(KERN_INFO "Failed to initialize Scratchpad data SRAM\n"); |
82 | return; | 82 | return; |
83 | } | 83 | } |
84 | 84 | ||
@@ -102,7 +102,7 @@ static void __init l1_data_sram_init(void) | |||
102 | free_l1_data_A_sram_head.next = | 102 | free_l1_data_A_sram_head.next = |
103 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); | 103 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); |
104 | if (!free_l1_data_A_sram_head.next) { | 104 | if (!free_l1_data_A_sram_head.next) { |
105 | printk(KERN_INFO"Fail to initialize L1 Data A SRAM.\n"); | 105 | printk(KERN_INFO "Failed to initialize L1 Data A SRAM\n"); |
106 | return; | 106 | return; |
107 | } | 107 | } |
108 | 108 | ||
@@ -123,7 +123,7 @@ static void __init l1_data_sram_init(void) | |||
123 | free_l1_data_B_sram_head.next = | 123 | free_l1_data_B_sram_head.next = |
124 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); | 124 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); |
125 | if (!free_l1_data_B_sram_head.next) { | 125 | if (!free_l1_data_B_sram_head.next) { |
126 | printk(KERN_INFO"Fail to initialize L1 Data B SRAM.\n"); | 126 | printk(KERN_INFO "Failed to initialize L1 Data B SRAM\n"); |
127 | return; | 127 | return; |
128 | } | 128 | } |
129 | 129 | ||
@@ -151,7 +151,7 @@ static void __init l1_inst_sram_init(void) | |||
151 | free_l1_inst_sram_head.next = | 151 | free_l1_inst_sram_head.next = |
152 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); | 152 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); |
153 | if (!free_l1_inst_sram_head.next) { | 153 | if (!free_l1_inst_sram_head.next) { |
154 | printk(KERN_INFO"Fail to initialize L1 Instruction SRAM.\n"); | 154 | printk(KERN_INFO "Failed to initialize L1 Instruction SRAM\n"); |
155 | return; | 155 | return; |
156 | } | 156 | } |
157 | 157 | ||
@@ -179,7 +179,7 @@ static void __init l2_sram_init(void) | |||
179 | free_l2_sram_head.next = | 179 | free_l2_sram_head.next = |
180 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); | 180 | kmem_cache_alloc(sram_piece_cache, GFP_KERNEL); |
181 | if (!free_l2_sram_head.next) { | 181 | if (!free_l2_sram_head.next) { |
182 | printk(KERN_INFO"Fail to initialize L2 SRAM.\n"); | 182 | printk(KERN_INFO "Failed to initialize L2 SRAM\n"); |
183 | return; | 183 | return; |
184 | } | 184 | } |
185 | 185 | ||
@@ -351,28 +351,31 @@ static int _sram_free(const void *addr, | |||
351 | 351 | ||
352 | int sram_free(const void *addr) | 352 | int sram_free(const void *addr) |
353 | { | 353 | { |
354 | if (0) {} | 354 | |
355 | #if L1_CODE_LENGTH != 0 | 355 | #if L1_CODE_LENGTH != 0 |
356 | else if (addr >= (void *)L1_CODE_START | 356 | if (addr >= (void *)L1_CODE_START |
357 | && addr < (void *)(L1_CODE_START + L1_CODE_LENGTH)) | 357 | && addr < (void *)(L1_CODE_START + L1_CODE_LENGTH)) |
358 | return l1_inst_sram_free(addr); | 358 | return l1_inst_sram_free(addr); |
359 | else | ||
359 | #endif | 360 | #endif |
360 | #if L1_DATA_A_LENGTH != 0 | 361 | #if L1_DATA_A_LENGTH != 0 |
361 | else if (addr >= (void *)L1_DATA_A_START | 362 | if (addr >= (void *)L1_DATA_A_START |
362 | && addr < (void *)(L1_DATA_A_START + L1_DATA_A_LENGTH)) | 363 | && addr < (void *)(L1_DATA_A_START + L1_DATA_A_LENGTH)) |
363 | return l1_data_A_sram_free(addr); | 364 | return l1_data_A_sram_free(addr); |
365 | else | ||
364 | #endif | 366 | #endif |
365 | #if L1_DATA_B_LENGTH != 0 | 367 | #if L1_DATA_B_LENGTH != 0 |
366 | else if (addr >= (void *)L1_DATA_B_START | 368 | if (addr >= (void *)L1_DATA_B_START |
367 | && addr < (void *)(L1_DATA_B_START + L1_DATA_B_LENGTH)) | 369 | && addr < (void *)(L1_DATA_B_START + L1_DATA_B_LENGTH)) |
368 | return l1_data_B_sram_free(addr); | 370 | return l1_data_B_sram_free(addr); |
371 | else | ||
369 | #endif | 372 | #endif |
370 | #if L2_LENGTH != 0 | 373 | #if L2_LENGTH != 0 |
371 | else if (addr >= (void *)L2_START | 374 | if (addr >= (void *)L2_START |
372 | && addr < (void *)(L2_START + L2_LENGTH)) | 375 | && addr < (void *)(L2_START + L2_LENGTH)) |
373 | return l2_sram_free(addr); | 376 | return l2_sram_free(addr); |
374 | #endif | ||
375 | else | 377 | else |
378 | #endif | ||
376 | return -1; | 379 | return -1; |
377 | } | 380 | } |
378 | EXPORT_SYMBOL(sram_free); | 381 | EXPORT_SYMBOL(sram_free); |