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

@@ -38,7 +38,7 @@ void spl_board_announce_boot_device(void)
printf("%s\n", fname);
}
int spl_board_load_image(struct spl_boot_device *bootdev)
static int spl_board_load_image(struct spl_boot_device *bootdev)
{
char fname[256];
int ret;
@@ -50,6 +50,7 @@ int spl_board_load_image(struct spl_boot_device *bootdev)
/* Hopefully this will not return */
return os_spl_to_uboot(fname);
}
SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_BOARD, spl_board_load_image);
void spl_board_init(void)
{