Don't grab memory for LCD if FB address is defined
[platform/kernel/u-boot.git] / arch / arm / lib / board.c
index 96c0e30..1a784a1 100644 (file)
@@ -356,9 +356,13 @@ void board_init_f (ulong bootflag)
 #endif /* CONFIG_VFD */
 
 #ifdef CONFIG_LCD
+#ifdef CONFIG_FB_ADDR
+       gd->fb_base = CONFIG_FB_ADDR;
+#else
        /* reserve memory for LCD display (always full pages) */
        addr = lcd_setmem (addr);
        gd->fb_base = addr;
+#endif /* CONFIG_FB_ADDR */
 #endif /* CONFIG_LCD */
 
        /*
@@ -399,7 +403,7 @@ void board_init_f (ulong bootflag)
                CONFIG_STACKSIZE_IRQ+CONFIG_STACKSIZE_FIQ, addr_sp);
 #endif
        /* leave 3 words for abort-stack    */
-       addr_sp -= 3;
+       addr_sp -= 12;
 
        /* 8-byte alignment for ABI compliance */
        addr_sp &= ~0x07;
@@ -459,7 +463,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
 
        gd->flags |= GD_FLG_RELOC;      /* tell others: relocation done */
 
-       monitor_flash_len = _bss_start_ofs;
+       monitor_flash_len = _end_ofs;
        debug ("monitor flash len: %08lX\n", monitor_flash_len);
        board_init();   /* Setup chipselects */
 
@@ -481,7 +485,7 @@ void board_init_r (gd_t *id, ulong dest_addr)
        mem_malloc_init (malloc_start, TOTAL_MALLOC_LEN);
 
 #if !defined(CONFIG_SYS_NO_FLASH)
-       puts ("FLASH: ");
+       puts ("Flash: ");
 
        if ((flash_size = flash_init ()) > 0) {
 # ifdef CONFIG_SYS_FLASH_CHECKSUM