diff options
Diffstat (limited to 'arch/blackfin/mm/init.c')
-rw-r--r-- | arch/blackfin/mm/init.c | 39 |
1 files changed, 9 insertions, 30 deletions
diff --git a/arch/blackfin/mm/init.c b/arch/blackfin/mm/init.c index ec3141fefd20..bc240abb8745 100644 --- a/arch/blackfin/mm/init.c +++ b/arch/blackfin/mm/init.c | |||
@@ -53,33 +53,6 @@ static unsigned long empty_bad_page; | |||
53 | 53 | ||
54 | unsigned long empty_zero_page; | 54 | unsigned long empty_zero_page; |
55 | 55 | ||
56 | void show_mem(void) | ||
57 | { | ||
58 | unsigned long i; | ||
59 | int free = 0, total = 0, reserved = 0, shared = 0; | ||
60 | |||
61 | int cached = 0; | ||
62 | printk(KERN_INFO "Mem-info:\n"); | ||
63 | show_free_areas(); | ||
64 | i = max_mapnr; | ||
65 | while (i-- > 0) { | ||
66 | total++; | ||
67 | if (PageReserved(mem_map + i)) | ||
68 | reserved++; | ||
69 | else if (PageSwapCache(mem_map + i)) | ||
70 | cached++; | ||
71 | else if (!page_count(mem_map + i)) | ||
72 | free++; | ||
73 | else | ||
74 | shared += page_count(mem_map + i) - 1; | ||
75 | } | ||
76 | printk(KERN_INFO "%d pages of RAM\n", total); | ||
77 | printk(KERN_INFO "%d free pages\n", free); | ||
78 | printk(KERN_INFO "%d reserved pages\n", reserved); | ||
79 | printk(KERN_INFO "%d pages shared\n", shared); | ||
80 | printk(KERN_INFO "%d pages swap cached\n", cached); | ||
81 | } | ||
82 | |||
83 | /* | 56 | /* |
84 | * paging_init() continues the virtual memory environment setup which | 57 | * paging_init() continues the virtual memory environment setup which |
85 | * was begun by the code in arch/head.S. | 58 | * was begun by the code in arch/head.S. |
@@ -164,11 +137,14 @@ void __init mem_init(void) | |||
164 | "(%uk init code, %uk kernel code, %uk data, %uk dma, %uk reserved)\n", | 137 | "(%uk init code, %uk kernel code, %uk data, %uk dma, %uk reserved)\n", |
165 | (unsigned long) freepages << (PAGE_SHIFT-10), _ramend >> 10, | 138 | (unsigned long) freepages << (PAGE_SHIFT-10), _ramend >> 10, |
166 | initk, codek, datak, DMA_UNCACHED_REGION >> 10, (reservedpages << (PAGE_SHIFT-10))); | 139 | initk, codek, datak, DMA_UNCACHED_REGION >> 10, (reservedpages << (PAGE_SHIFT-10))); |
140 | } | ||
141 | |||
142 | static int __init sram_init(void) | ||
143 | { | ||
144 | unsigned long tmp; | ||
167 | 145 | ||
168 | /* Initialize the blackfin L1 Memory. */ | 146 | /* Initialize the blackfin L1 Memory. */ |
169 | l1sram_init(); | 147 | bfin_sram_init(); |
170 | l1_data_sram_init(); | ||
171 | l1_inst_sram_init(); | ||
172 | 148 | ||
173 | /* Allocate this once; never free it. We assume this gives us a | 149 | /* Allocate this once; never free it. We assume this gives us a |
174 | pointer to the start of L1 scratchpad memory; panic if it | 150 | pointer to the start of L1 scratchpad memory; panic if it |
@@ -179,7 +155,10 @@ void __init mem_init(void) | |||
179 | tmp, (unsigned long)L1_SCRATCH_TASK_INFO); | 155 | tmp, (unsigned long)L1_SCRATCH_TASK_INFO); |
180 | panic("No L1, time to give up\n"); | 156 | panic("No L1, time to give up\n"); |
181 | } | 157 | } |
158 | |||
159 | return 0; | ||
182 | } | 160 | } |
161 | pure_initcall(sram_init); | ||
183 | 162 | ||
184 | static void __init free_init_pages(const char *what, unsigned long begin, unsigned long end) | 163 | static void __init free_init_pages(const char *what, unsigned long begin, unsigned long end) |
185 | { | 164 | { |