From 97d9df0a91f1c68695913518d8dfaf26c41dbb32 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 24 Sep 2016 18:20:12 -0600 Subject: 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 Reviewed-by: Tom Rini --- common/spl/spl.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'common') diff --git a/common/spl/spl.c b/common/spl/spl.c index 713c27f..84c8034 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) -- cgit v1.1