Skip to content
Snippets Groups Projects
Commit c60a5791 authored by Michal Simek's avatar Michal Simek
Browse files

microblaze: board: Use bi_flashstart instead of CONFIG_SYS_FLASH_BASE


Prepare for device-tree driven configuration.

Signed-off-by: default avatarMichal Simek <monstr@monstr.eu>
Acked-by: default avatarStephan Linz <linz@li-pro.net>
parent 2380b8f5
No related branches found
No related tags found
No related merge requests found
...@@ -136,9 +136,8 @@ void board_init_f(ulong not_used) ...@@ -136,9 +136,8 @@ void board_init_f(ulong not_used)
#if defined(CONFIG_CMD_FLASH) #if defined(CONFIG_CMD_FLASH)
puts ("Flash: "); puts ("Flash: ");
bd->bi_flashstart = CONFIG_SYS_FLASH_BASE; bd->bi_flashstart = CONFIG_SYS_FLASH_BASE;
if (0 < (flash_size = flash_init ())) { flash_size = flash_init();
bd->bi_flashsize = flash_size; if (bd->bi_flashstart && flash_size > 0) {
bd->bi_flashoffset = CONFIG_SYS_FLASH_BASE + flash_size;
# ifdef CONFIG_SYS_FLASH_CHECKSUM # ifdef CONFIG_SYS_FLASH_CHECKSUM
print_size (flash_size, ""); print_size (flash_size, "");
/* /*
...@@ -149,13 +148,16 @@ void board_init_f(ulong not_used) ...@@ -149,13 +148,16 @@ void board_init_f(ulong not_used)
s = getenv ("flashchecksum"); s = getenv ("flashchecksum");
if (s && (*s == 'y')) { if (s && (*s == 'y')) {
printf (" CRC: %08X", 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'); putc ('\n');
# else /* !CONFIG_SYS_FLASH_CHECKSUM */ # else /* !CONFIG_SYS_FLASH_CHECKSUM */
print_size (flash_size, "\n"); print_size (flash_size, "\n");
# endif /* CONFIG_SYS_FLASH_CHECKSUM */ # endif /* CONFIG_SYS_FLASH_CHECKSUM */
bd->bi_flashsize = flash_size;
bd->bi_flashoffset = bd->bi_flashstart + flash_size;
} else { } else {
puts ("Flash init FAILED"); puts ("Flash init FAILED");
bd->bi_flashstart = 0; bd->bi_flashstart = 0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment