Jean-Christophe PLAGNIOL-VILLARD wrote:
> @@ -352,13 +355,16 @@ void board_init_r (gd_t *id, ulong dest_addr)
>       env_name_spec += gd->reloc_off;
>  #endif
>  
> +     bd = gd->bd;
> +
> +#ifndef CFG_NO_FLASH
>       /* configure available FLASH banks */
>       size = flash_init();
>       display_flash_config (size);
> +     bd->bi_flashsize = size;
> +#endif
>  
> -     bd = gd->bd;
>       bd->bi_flashstart = CFG_FLASH_BASE;
> -     bd->bi_flashsize = size;
>  #if CFG_MONITOR_BASE == CFG_FLASH_BASE
>       bd->bi_flashoffset = monitor_flash_len; /* reserved area for U-Boot */
>  #else

Hm, could we clean up further more?

diff --git a/lib_mips/board.c b/lib_mips/board.c
index 1645f2c..b9606e4 100644
--- a/lib_mips/board.c
+++ b/lib_mips/board.c
@@ -361,15 +361,15 @@ void board_init_r (gd_t *id, ulong dest_addr)
        /* configure available FLASH banks */
        size = flash_init();
        display_flash_config (size);
+       bd->bi_flashstart = CFG_FLASH_BASE;
        bd->bi_flashsize = size;
-#endif
 
-       bd->bi_flashstart = CFG_FLASH_BASE;
 #if CFG_MONITOR_BASE == CFG_FLASH_BASE
        bd->bi_flashoffset = monitor_flash_len; /* reserved area for U-Boot */
 #else
        bd->bi_flashoffset = 0;
 #endif
+#endif /* CFG_NO_FLASH */
 
        /* initialize malloc() area */
        mem_malloc_init();
_

And if possible, please split the patch into two; one is for board.c,
the other for qemu-mips.

  Shinya



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
U-Boot-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/u-boot-users

Reply via email to