summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2016-09-24 18:20:12 -0600
committerTom Rini <trini@konsulko.com>2016-10-06 15:08:50 -0400
commit97d9df0a91f1c68695913518d8dfaf26c41dbb32 (patch)
tree78671e0558f13a3c3716950fdd2ee0552d43b68e /common
parent7ec0389354b8fd27ed1d1fb2d4f451e74f40534c (diff)
spl: Convert spl_board_load_image() to use linker list
Add a linker list declaration for this method and remove the explicit switch() code. Update existing users. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 713c27fa2c7..84c80345b69 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -383,19 +383,10 @@ static int spl_load_image(u32 boot_device)
if (loader)
return loader->load_image(&bootdev);
- switch (boot_device) {
-#ifdef CONFIG_SPL_BOARD_LOAD_IMAGE
- case BOOT_DEVICE_BOARD:
- return spl_board_load_image(&bootdev);
-#endif
- default:
#if defined(CONFIG_SPL_SERIAL_SUPPORT) && defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
- puts("SPL: Unsupported Boot Device!\n");
+ puts("SPL: Unsupported Boot Device!\n");
#endif
- return -ENODEV;
- }
-
- return -EINVAL;
+ return -ENODEV;
}
void board_init_r(gd_t *dummy1, ulong dummy2)