mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-24 21:54:01 +00:00
Don't tftp to unknown flash
If a board has a variable number of flash banks, there are empty entries in flash_info[] and CFG_DIRECT_FLASH_TFTP is set, tftp boot fails with "Outside available Flash". This patch skips flash banks with unknown flash ids. Signed-off-by: Jochen Friedrich <jochen@scram.de> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
parent
33314470ab
commit
be1b0d2777
1 changed files with 2 additions and 0 deletions
|
@ -111,6 +111,8 @@ store_block (unsigned block, uchar * src, unsigned len)
|
|||
|
||||
for (i=0; i<CFG_MAX_FLASH_BANKS; i++) {
|
||||
/* start address in flash? */
|
||||
if (flash_info[i].flash_id == FLASH_UNKNOWN)
|
||||
continue;
|
||||
if (load_addr + offset >= flash_info[i].start[0]) {
|
||||
rc = 1;
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue