X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Fblackfin%2Fkernel%2Fsetup.c;h=1a942a721d5193a693303e80b08e364a0a8fb3db;hb=a2c8cfef6abb33ee49d80c58391ebfc4f94221ef;hp=eee5a1fcb64cf06a812a9b4742764f519dbb9cde;hpb=1754a5d9f97f16f729066b8f125351af4951d6fe;p=linux-2.6 diff --git a/arch/blackfin/kernel/setup.c b/arch/blackfin/kernel/setup.c index eee5a1fcb6..1a942a721d 100644 --- a/arch/blackfin/kernel/setup.c +++ b/arch/blackfin/kernel/setup.c @@ -237,8 +237,13 @@ void __init setup_arch(char **cmdline_p) /* by now the stack is part of the init task */ memory_end = _ramend - DMA_UNCACHED_REGION; - _ramstart = (unsigned long)_end; + _ramstart = (unsigned long)__bss_stop; +#ifdef CONFIG_MPU + /* Round up to multiple of 4MB. */ + memory_start = (_ramstart + 0x3fffff) & ~0x3fffff; +#else memory_start = PAGE_ALIGN(_ramstart); +#endif #if defined(CONFIG_MTD_UCLINUX) /* generic memory mapped MTD driver */ @@ -286,7 +291,7 @@ void __init setup_arch(char **cmdline_p) } /* Relocate MTD image to the top of memory after the uncached memory area */ - dma_memcpy((char *)memory_end, _end, mtd_size); + dma_memcpy((char *)memory_end, __bss_stop, mtd_size); memory_mtd_start = memory_end; _ebss = memory_mtd_start; /* define _ebss for compatible */ @@ -307,6 +312,11 @@ void __init setup_arch(char **cmdline_p) printk(KERN_NOTICE "Warning: limiting memory to %liMB due to hardware anomaly 05000263\n", memory_end >> 20); #endif /* ANOMALY_05000263 */ +#ifdef CONFIG_MPU + page_mask_nelts = ((_ramend >> PAGE_SHIFT) + 31) / 32; + page_mask_order = get_order(3 * page_mask_nelts * sizeof(long)); +#endif + #if !defined(CONFIG_MTD_UCLINUX) memory_end -= SIZE_4K; /*In case there is no valid CPLB behind memory_end make sure we don't get to close*/ #endif @@ -315,8 +325,6 @@ void __init setup_arch(char **cmdline_p) init_mm.end_data = (unsigned long)_edata; init_mm.brk = (unsigned long)0; - init_leds(); - _bfin_swrst = bfin_read_SWRST(); if (_bfin_swrst & RESET_DOUBLE) @@ -358,10 +366,10 @@ void __init setup_arch(char **cmdline_p) printk(KERN_INFO "Memory map:\n" KERN_INFO " text = 0x%p-0x%p\n" KERN_INFO " rodata = 0x%p-0x%p\n" - KERN_INFO " bss = 0x%p-0x%p\n" KERN_INFO " data = 0x%p-0x%p\n" KERN_INFO " stack = 0x%p-0x%p\n" KERN_INFO " init = 0x%p-0x%p\n" + KERN_INFO " bss = 0x%p-0x%p\n" KERN_INFO " available = 0x%p-0x%p\n" #ifdef CONFIG_MTD_UCLINUX KERN_INFO " rootfs = 0x%p-0x%p\n" @@ -371,10 +379,10 @@ void __init setup_arch(char **cmdline_p) #endif , _stext, _etext, __start_rodata, __end_rodata, - __bss_start, __bss_stop, _sdata, _edata, (void *)&init_thread_union, (void *)((int)(&init_thread_union) + 0x2000), __init_begin, __init_end, + __bss_start, __bss_stop, (void *)_ramstart, (void *)memory_end #ifdef CONFIG_MTD_UCLINUX , (void *)memory_mtd_start, (void *)(memory_mtd_start + mtd_size)