From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephan Linz Date: Tue, 07 Aug 2012 22:10:40 +0200 Subject: [U-Boot] [PATCH v2 7/7] microblaze: board: Use bi_flashstart instead of CONFIG_SYS_FLASH_BASE In-Reply-To: <1344239199-11445-7-git-send-email-monstr@monstr.eu> References: <1344239199-11445-1-git-send-email-monstr@monstr.eu> <1344239199-11445-7-git-send-email-monstr@monstr.eu> Message-ID: <1344370241.29456.92.camel@keto> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am Montag, den 06.08.2012, 09:46 +0200 schrieb Michal Simek: > Prepare for device-tree driven configuration. > > Signed-off-by: Michal Simek > Acked-by: Stephan Linz Tested with AXI systems on Avnet S6LX150T and S6LX9 micro-evaluation. > --- > v2: Move bi_flashsize and bi_flashoffset from other patch > --- > arch/microblaze/lib/board.c | 10 ++++++---- > 1 files changed, 6 insertions(+), 4 deletions(-) > > diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c > index b450367..674b573 100644 > --- a/arch/microblaze/lib/board.c > +++ b/arch/microblaze/lib/board.c > @@ -136,9 +136,8 @@ void board_init_f(ulong not_used) > #if defined(CONFIG_CMD_FLASH) > puts ("Flash: "); > bd->bi_flashstart = CONFIG_SYS_FLASH_BASE; > - if (0 < (flash_size = flash_init ())) { > - bd->bi_flashsize = flash_size; > - bd->bi_flashoffset = CONFIG_SYS_FLASH_BASE + flash_size; > + flash_size = flash_init(); > + if (bd->bi_flashstart && flash_size > 0) { > # ifdef CONFIG_SYS_FLASH_CHECKSUM > print_size (flash_size, ""); > /* > @@ -149,13 +148,16 @@ void board_init_f(ulong not_used) > s = getenv ("flashchecksum"); > if (s && (*s == 'y')) { > printf (" CRC: %08X", > - crc32 (0, (const unsigned char *) CONFIG_SYS_FLASH_BASE, flash_size) > + crc32(0, (const u8 *)bd->bi_flashstart, > + flash_size) > ); > } > putc ('\n'); > # else /* !CONFIG_SYS_FLASH_CHECKSUM */ > print_size (flash_size, "\n"); > # endif /* CONFIG_SYS_FLASH_CHECKSUM */ > + bd->bi_flashsize = flash_size; > + bd->bi_flashoffset = bd->bi_flashstart + flash_size; > } else { > puts ("Flash init FAILED"); > bd->bi_flashstart = 0; -- Viele Gr??e, Stephan Linz ______________________________________________________________________________ MB-Ref: http://www.li-pro.de/xilinx_mb:mbref:start OpenDCC: http://www.li-pro.net/opendcc.phtml PC/M: http://www.li-pro.net/pcm.phtml Sourceforge: http://sourceforge.net/users/slz Gitorious: https://gitorious.org/~slz