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.c34
1 files changed, 28 insertions, 6 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c
index 95448ae9c43a..8e2efceb364b 100644
--- a/arch/blackfin/kernel/setup.c
+++ b/arch/blackfin/kernel/setup.c
@@ -220,6 +220,16 @@ void __init bfin_relocate_l1_mem(void)
220 memcpy(_stext_l2, _l2_lma, l2_len); 220 memcpy(_stext_l2, _l2_lma, l2_len);
221} 221}
222 222
223#ifdef CONFIG_ROMKERNEL
224void __init bfin_relocate_xip_data(void)
225{
226 early_shadow_stamp();
227
228 memcpy(_sdata, _data_lma, (unsigned long)_data_len - THREAD_SIZE + sizeof(struct thread_info));
229 memcpy(_sinitdata, _init_data_lma, (unsigned long)_init_data_len);
230}
231#endif
232
223/* add_memory_region to memmap */ 233/* add_memory_region to memmap */
224static void __init add_memory_region(unsigned long long start, 234static void __init add_memory_region(unsigned long long start,
225 unsigned long long size, int type) 235 unsigned long long size, int type)
@@ -504,7 +514,7 @@ static __init void memory_setup(void)
504#endif 514#endif
505 unsigned long max_mem; 515 unsigned long max_mem;
506 516
507 _rambase = (unsigned long)_stext; 517 _rambase = CONFIG_BOOT_LOAD;
508 _ramstart = (unsigned long)_end; 518 _ramstart = (unsigned long)_end;
509 519
510 if (DMA_UNCACHED_REGION > (_ramend - _ramstart)) { 520 if (DMA_UNCACHED_REGION > (_ramend - _ramstart)) {
@@ -597,7 +607,12 @@ static __init void memory_setup(void)
597 } 607 }
598 608
599#ifdef CONFIG_MPU 609#ifdef CONFIG_MPU
610#if defined(CONFIG_ROMFS_ON_MTD) && defined(CONFIG_MTD_ROM)
611 page_mask_nelts = (((_ramend + ASYNC_BANK3_BASE + ASYNC_BANK3_SIZE -
612 ASYNC_BANK0_BASE) >> PAGE_SHIFT) + 31) / 32;
613#else
600 page_mask_nelts = ((_ramend >> PAGE_SHIFT) + 31) / 32; 614 page_mask_nelts = ((_ramend >> PAGE_SHIFT) + 31) / 32;
615#endif
601 page_mask_order = get_order(3 * page_mask_nelts * sizeof(long)); 616 page_mask_order = get_order(3 * page_mask_nelts * sizeof(long));
602#endif 617#endif
603 618
@@ -630,7 +645,7 @@ static __init void memory_setup(void)
630 __bss_start, __bss_stop, 645 __bss_start, __bss_stop,
631 _sdata, _edata, 646 _sdata, _edata,
632 (void *)&init_thread_union, 647 (void *)&init_thread_union,
633 (void *)((int)(&init_thread_union) + 0x2000), 648 (void *)((int)(&init_thread_union) + THREAD_SIZE),
634 __init_begin, __init_end, 649 __init_begin, __init_end,
635 (void *)_ramstart, (void *)memory_end 650 (void *)_ramstart, (void *)memory_end
636#ifdef CONFIG_MTD_UCLINUX 651#ifdef CONFIG_MTD_UCLINUX
@@ -792,10 +807,17 @@ static inline int __init get_mem_size(void)
792 BUG(); 807 BUG();
793} 808}
794 809
810__attribute__((weak))
811void __init native_machine_early_platform_add_devices(void)
812{
813}
814
795void __init setup_arch(char **cmdline_p) 815void __init setup_arch(char **cmdline_p)
796{ 816{
797 unsigned long sclk, cclk; 817 unsigned long sclk, cclk;
798 818
819 native_machine_early_platform_add_devices();
820
799 enable_shadow_console(); 821 enable_shadow_console();
800 822
801 /* Check to make sure we are running on the right processor */ 823 /* Check to make sure we are running on the right processor */
@@ -1217,10 +1239,10 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1217 dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS, 1239 dsup_banks, BFIN_DSUBBANKS, BFIN_DWAYS,
1218 BFIN_DLINES); 1240 BFIN_DLINES);
1219#ifdef __ARCH_SYNC_CORE_DCACHE 1241#ifdef __ARCH_SYNC_CORE_DCACHE
1220 seq_printf(m, "SMP Dcache Flushes\t: %lu\n\n", cpudata->dcache_invld_count); 1242 seq_printf(m, "SMP Dcache Flushes\t: %lu\n\n", dcache_invld_count[cpu_num]);
1221#endif 1243#endif
1222#ifdef __ARCH_SYNC_CORE_ICACHE 1244#ifdef __ARCH_SYNC_CORE_ICACHE
1223 seq_printf(m, "SMP Icache Flushes\t: %lu\n\n", cpudata->icache_invld_count); 1245 seq_printf(m, "SMP Icache Flushes\t: %lu\n\n", icache_invld_count[cpu_num]);
1224#endif 1246#endif
1225 1247
1226 if (cpu_num != num_possible_cpus() - 1) 1248 if (cpu_num != num_possible_cpus() - 1)
@@ -1249,8 +1271,8 @@ static int show_cpuinfo(struct seq_file *m, void *v)
1249 seq_printf(m, "board memory\t: %ld kB (0x%p -> 0x%p)\n", 1271 seq_printf(m, "board memory\t: %ld kB (0x%p -> 0x%p)\n",
1250 physical_mem_end >> 10, (void *)0, (void *)physical_mem_end); 1272 physical_mem_end >> 10, (void *)0, (void *)physical_mem_end);
1251 seq_printf(m, "kernel memory\t: %d kB (0x%p -> 0x%p)\n", 1273 seq_printf(m, "kernel memory\t: %d kB (0x%p -> 0x%p)\n",
1252 ((int)memory_end - (int)_stext) >> 10, 1274 ((int)memory_end - (int)_rambase) >> 10,
1253 _stext, 1275 (void *)_rambase,
1254 (void *)memory_end); 1276 (void *)memory_end);
1255 seq_printf(m, "\n"); 1277 seq_printf(m, "\n");
1256 1278