]> err.no Git - linux-2.6/blobdiff - arch/blackfin/kernel/setup.c
[Blackfin] arch: GPIO API cleanup and anomaly update
[linux-2.6] / arch / blackfin / kernel / setup.c
index d2822010b7ce4318ef2eed5446c9a7694fb10489..1a942a721d5193a693303e80b08e364a0a8fb3db 100644 (file)
@@ -238,7 +238,12 @@ void __init setup_arch(char **cmdline_p)
        memory_end = _ramend - DMA_UNCACHED_REGION;
 
        _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 */
@@ -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)