diff options
Diffstat (limited to 'arch/blackfin/kernel/setup.c')
| -rw-r--r-- | arch/blackfin/kernel/setup.c | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index 6136c33e919f..6225edae488e 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c | |||
| @@ -168,7 +168,6 @@ void __cpuinit bfin_setup_cpudata(unsigned int cpu) | |||
| 168 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); | 168 | struct blackfin_cpudata *cpudata = &per_cpu(cpu_data, cpu); |
| 169 | 169 | ||
| 170 | cpudata->idle = current; | 170 | cpudata->idle = current; |
| 171 | cpudata->loops_per_jiffy = loops_per_jiffy; | ||
| 172 | cpudata->imemctl = bfin_read_IMEM_CONTROL(); | 171 | cpudata->imemctl = bfin_read_IMEM_CONTROL(); |
| 173 | cpudata->dmemctl = bfin_read_DMEM_CONTROL(); | 172 | cpudata->dmemctl = bfin_read_DMEM_CONTROL(); |
| 174 | } | 173 | } |
| @@ -568,17 +567,23 @@ static __init void memory_setup(void) | |||
| 568 | # endif /* ANOMALY_05000263 */ | 567 | # endif /* ANOMALY_05000263 */ |
| 569 | # endif /* CONFIG_ROMFS_FS */ | 568 | # endif /* CONFIG_ROMFS_FS */ |
| 570 | 569 | ||
| 571 | memory_end -= mtd_size; | 570 | /* Since the default MTD_UCLINUX has no magic number, we just blindly |
| 572 | 571 | * read 8 past the end of the kernel's image, and look at it. | |
| 573 | if (mtd_size == 0) { | 572 | * When no image is attached, mtd_size is set to a random number |
| 574 | console_init(); | 573 | * Do some basic sanity checks before operating on things |
| 575 | panic("Don't boot kernel without rootfs attached."); | 574 | */ |
| 575 | if (mtd_size == 0 || memory_end <= mtd_size) { | ||
| 576 | pr_emerg("Could not find valid ram mtd attached.\n"); | ||
| 577 | } else { | ||
| 578 | memory_end -= mtd_size; | ||
| 579 | |||
| 580 | /* Relocate MTD image to the top of memory after the uncached memory area */ | ||
| 581 | uclinux_ram_map.phys = memory_mtd_start = memory_end; | ||
| 582 | uclinux_ram_map.size = mtd_size; | ||
| 583 | pr_info("Found mtd parition at 0x%p, (len=0x%lx), moving to 0x%p\n", | ||
| 584 | _end, mtd_size, (void *)memory_mtd_start); | ||
| 585 | dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size); | ||
| 576 | } | 586 | } |
| 577 | |||
| 578 | /* Relocate MTD image to the top of memory after the uncached memory area */ | ||
| 579 | uclinux_ram_map.phys = memory_mtd_start = memory_end; | ||
| 580 | uclinux_ram_map.size = mtd_size; | ||
| 581 | dma_memcpy((void *)uclinux_ram_map.phys, _end, uclinux_ram_map.size); | ||
| 582 | #endif /* CONFIG_MTD_UCLINUX */ | 587 | #endif /* CONFIG_MTD_UCLINUX */ |
| 583 | 588 | ||
| 584 | #if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) | 589 | #if (defined(CONFIG_BFIN_EXTMEM_ICACHEABLE) && ANOMALY_05000263) |
| @@ -868,13 +873,6 @@ void __init setup_arch(char **cmdline_p) | |||
| 868 | else | 873 | else |
| 869 | printk(KERN_CONT "and Disabled\n"); | 874 | printk(KERN_CONT "and Disabled\n"); |
| 870 | 875 | ||
| 871 | #if defined(CONFIG_CHR_DEV_FLASH) || defined(CONFIG_BLK_DEV_FLASH) | ||
| 872 | /* we need to initialize the Flashrom device here since we might | ||
| 873 | * do things with flash early on in the boot | ||
| 874 | */ | ||
| 875 | flash_probe(); | ||
| 876 | #endif | ||
| 877 | |||
| 878 | printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF); | 876 | printk(KERN_INFO "Boot Mode: %i\n", bfin_read_SYSCR() & 0xF); |
| 879 | 877 | ||
| 880 | /* Newer parts mirror SWRST bits in SYSCR */ | 878 | /* Newer parts mirror SWRST bits in SYSCR */ |
| @@ -938,10 +936,6 @@ void __init setup_arch(char **cmdline_p) | |||
| 938 | CPU, bfin_revid()); | 936 | CPU, bfin_revid()); |
| 939 | } | 937 | } |
| 940 | 938 | ||
| 941 | /* We can't run on BF548-0.1 due to ANOMALY 05000448 */ | ||
| 942 | if (bfin_cpuid() == 0x27de && bfin_revid() == 1) | ||
| 943 | panic("You can't run on this processor due to 05000448"); | ||
| 944 | |||
| 945 | printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); | 939 | printk(KERN_INFO "Blackfin Linux support by http://blackfin.uclinux.org/\n"); |
| 946 | 940 | ||
| 947 | printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", | 941 | printk(KERN_INFO "Processor Speed: %lu MHz core clock and %lu MHz System Clock\n", |
| @@ -1164,9 +1158,9 @@ static int show_cpuinfo(struct seq_file *m, void *v) | |||
| 1164 | sclk/1000000, sclk%1000000); | 1158 | sclk/1000000, sclk%1000000); |
| 1165 | seq_printf(m, "bogomips\t: %lu.%02lu\n" | 1159 | seq_printf(m, "bogomips\t: %lu.%02lu\n" |
| 1166 | "Calibration\t: %lu loops\n", | 1160 | "Calibration\t: %lu loops\n", |
| 1167 | (cpudata->loops_per_jiffy * HZ) / 500000, | 1161 | (loops_per_jiffy * HZ) / 500000, |
| 1168 | ((cpudata->loops_per_jiffy * HZ) / 5000) % 100, | 1162 | ((loops_per_jiffy * HZ) / 5000) % 100, |
| 1169 | (cpudata->loops_per_jiffy * HZ)); | 1163 | (loops_per_jiffy * HZ)); |
| 1170 | 1164 | ||
| 1171 | /* Check Cache configutation */ | 1165 | /* Check Cache configutation */ |
| 1172 | switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) { | 1166 | switch (cpudata->dmemctl & (1 << DMC0_P | 1 << DMC1_P)) { |
