diff options
author | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-12-05 12:20:58 +0900 |
---|---|---|
committer | Masahiro Yamada <yamada.m@jp.panasonic.com> | 2014-12-08 01:25:28 +0900 |
commit | 70879a92561abd300e9e84b25fff841bb3b34837 (patch) | |
tree | 61418cf86e628ca7003d88e1b1e70400a60f48ea /common/board_r.c | |
parent | 9248a78f40d622c9d1d21dbbe29db418a6be99ae (diff) | |
download | u-boot-70879a92561abd300e9e84b25fff841bb3b34837.tar.gz u-boot-70879a92561abd300e9e84b25fff841bb3b34837.tar.bz2 u-boot-70879a92561abd300e9e84b25fff841bb3b34837.zip |
flash: do not fail even if flash_size is zero
CONFIG_SYS_MAX_FLASH_BANKS_DETECT allows to determine the number of
flash banks at run-time, that is, there is a possibility that no flash
bank is found. Even in such cases, it makes sense to continue the
boot process without any flash device.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Stefan Roese <sr@denx.de>
Diffstat (limited to 'common/board_r.c')
-rw-r--r-- | common/board_r.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/common/board_r.c b/common/board_r.c index 1b8998d093..6e597127a2 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -291,26 +291,14 @@ static int initr_flash(void) { ulong flash_size = 0; bd_t *bd = gd->bd; - int ok; puts("Flash: "); - if (board_flash_wp_on()) { + if (board_flash_wp_on()) printf("Uninitialized - Write Protect On\n"); - /* Since WP is on, we can't find real size. Set to 0 */ - ok = 1; - } else { + else flash_size = flash_init(); - ok = flash_size > 0; - } - if (!ok) { - puts("*** failed ***\n"); -#ifdef CONFIG_PPC - /* Why does PPC do this? */ - hang(); -#endif - return -1; - } + print_size(flash_size, ""); #ifdef CONFIG_SYS_FLASH_CHECKSUM /* |