aboutsummaryrefslogtreecommitdiffstats
path: root/arch/blackfin/kernel/setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
-rw-r--r--arch/blackfin/kernel/setup.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index ac71dc15cbdb..805c6132c779 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -215,11 +215,48 @@ void __init bfin_relocate_l1_mem(void)
215 215
216 early_dma_memcpy_done(); 216 early_dma_memcpy_done();
217 217
218#if defined(CONFIG_SMP) && defined(CONFIG_ICACHE_FLUSH_L1)
219 blackfin_iflush_l1_entry[0] = (unsigned long)blackfin_icache_flush_range_l1;
220#endif
221
218 /* if necessary, copy L2 text/data to L2 SRAM */ 222 /* if necessary, copy L2 text/data to L2 SRAM */
219 if (L2_LENGTH && l2_len) 223 if (L2_LENGTH && l2_len)
220 memcpy(_stext_l2, _l2_lma, l2_len); 224 memcpy(_stext_l2, _l2_lma, l2_len);
221} 225}
222 226
227#ifdef CONFIG_SMP
228void __init bfin_relocate_coreb_l1_mem(void)
229{
230 unsigned long text_l1_len = (unsigned long)_text_l1_len;
231 unsigned long data_l1_len = (unsigned long)_data_l1_len;
232 unsigned long data_b_l1_len = (unsigned long)_data_b_l1_len;
233
234 blackfin_dma_early_init();
235
236 /* if necessary, copy L1 text to L1 instruction SRAM */
237 if (L1_CODE_LENGTH && text_l1_len)
238 early_dma_memcpy((void *)COREB_L1_CODE_START, _text_l1_lma,
239 text_l1_len);
240
241 /* if necessary, copy L1 data to L1 data bank A SRAM */
242 if (L1_DATA_A_LENGTH && data_l1_len)
243 early_dma_memcpy((void *)COREB_L1_DATA_A_START, _data_l1_lma,
244 data_l1_len);
245
246 /* if necessary, copy L1 data B to L1 data bank B SRAM */
247 if (L1_DATA_B_LENGTH && data_b_l1_len)
248 early_dma_memcpy((void *)COREB_L1_DATA_B_START, _data_b_l1_lma,
249 data_b_l1_len);
250
251 early_dma_memcpy_done();
252
253#ifdef CONFIG_ICACHE_FLUSH_L1
254 blackfin_iflush_l1_entry[1] = (unsigned long)blackfin_icache_flush_range_l1 -
255 (unsigned long)_stext_l1 + COREB_L1_CODE_START;
256#endif
257}
258#endif
259
223#ifdef CONFIG_ROMKERNEL 260#ifdef CONFIG_ROMKERNEL
224void __init bfin_relocate_xip_data(void) 261void __init bfin_relocate_xip_data(void)
225{ 262{