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>
This commit is contained in:
Simon Glass
2016-09-24 18:20:12 -06:00
committed by Tom Rini
parent 7ec0389354
commit 97d9df0a91
5 changed files with 10 additions and 22 deletions

View File

@ -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)