summaryrefslogtreecommitdiff
path: root/arch/microblaze/lib
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2012-07-10 10:21:25 +0200
committerMichal Simek <monstr@monstr.eu>2012-09-11 09:24:58 +0200
commitc60a57912a3efcdcc087422a1e9ce2dc1b61e39d (patch)
tree8630d8b531805a5ff314ad9f99f3d09d309b8b53 /arch/microblaze/lib
parent2380b8f529ae95cc51fa475e83101e40f4191a43 (diff)
downloadu-boot-imx-c60a57912a3efcdcc087422a1e9ce2dc1b61e39d.zip
u-boot-imx-c60a57912a3efcdcc087422a1e9ce2dc1b61e39d.tar.gz
u-boot-imx-c60a57912a3efcdcc087422a1e9ce2dc1b61e39d.tar.bz2
microblaze: board: Use bi_flashstart instead of CONFIG_SYS_FLASH_BASE
Prepare for device-tree driven configuration. Signed-off-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephan Linz <linz@li-pro.net>
Diffstat (limited to 'arch/microblaze/lib')
-rw-r--r--arch/microblaze/lib/board.c10
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;