From mboxrd@z Thu Jan 1 00:00:00 1970 From: Shinya Kuribayashi Date: Mon, 18 Feb 2008 23:30:16 +0900 Subject: [U-Boot-Users] [PATCH] MIPS: Fix CFG_NO_FLASH support In-Reply-To: <1203263884-1282-1-git-send-email-plagnioj@jcrosoft.com> References: <1203263884-1282-1-git-send-email-plagnioj@jcrosoft.com> Message-ID: <47B99678.2070407@ruby.dti.ne.jp> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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