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:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user