]> git.sur5r.net Git - u-boot/commitdiff
MIPS: board.c: fix init of flash data in bd_info
authorDaniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Mon, 2 Apr 2012 02:57:54 +0000 (02:57 +0000)
committerMarek Vasut <marex@denx.de>
Mon, 2 Apr 2012 13:54:52 +0000 (15:54 +0200)
Boards with CONFIG_SYS_NO_FLASH should not forced to define
CONFIG_SYS_FLASH_BASE. In this case the flash data in bd_info
should be initialized with 0 like the other archs do.

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
arch/mips/lib/board.c

index d998f0e74904416bcc7890c747b9990698bbb2e3..38e6e77a34b460b480f7e6993d74efc4a40361d5 100644 (file)
@@ -294,15 +294,19 @@ void board_init_r(gd_t *id, ulong dest_addr)
        /* configure available FLASH banks */
        size = flash_init();
        display_flash_config(size);
+       bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
        bd->bi_flashsize = size;
-#endif
 
-       bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
 #if CONFIG_SYS_MONITOR_BASE == CONFIG_SYS_FLASH_BASE
        bd->bi_flashoffset = monitor_flash_len; /* reserved area for U-Boot */
 #else
        bd->bi_flashoffset = 0;
 #endif
+#else
+       bd->bi_flashstart = 0;
+       bd->bi_flashsize = 0;
+       bd->bi_flashoffset = 0;
+#endif
 
 #ifdef CONFIG_CMD_NAND
        puts("NAND:  ");