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 --- arch/sandbox/cpu/spl.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/sandbox') diff --git a/arch/sandbox/cpu/spl.c b/arch/sandbox/cpu/spl.c index 4cee293..2c45354 100644 --- a/arch/sandbox/cpu/spl.c +++ b/arch/sandbox/cpu/spl.c @@ -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) { -- cgit v1.1