diff options
author | Simon Glass <sjg@chromium.org> | 2016-09-25 00:20:12 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-10-06 19:08:50 (GMT) |
commit | 97d9df0a91f1c68695913518d8dfaf26c41dbb32 (patch) | |
tree | 78671e0558f13a3c3716950fdd2ee0552d43b68e /arch/arm | |
parent | 7ec0389354b8fd27ed1d1fb2d4f451e74f40534c (diff) | |
download | u-boot-97d9df0a91f1c68695913518d8dfaf26c41dbb32.tar.xz |
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>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-sunxi/board.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-uniphier/boot-mode/spl_board.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/mach-sunxi/board.c b/arch/arm/mach-sunxi/board.c index 8a385a2..22f3e3c 100644 --- a/arch/arm/mach-sunxi/board.c +++ b/arch/arm/mach-sunxi/board.c @@ -133,13 +133,16 @@ static int gpio_init(void) return 0; } -int spl_board_load_image(struct spl_boot_device *bootdev) +#ifdef CONFIG_SPL_BUILD +static int spl_board_load_image(struct spl_boot_device *bootdev) { debug("Returning to FEL sp=%x, lr=%x\n", fel_stash.sp, fel_stash.lr); return_to_fel(fel_stash.sp, fel_stash.lr); return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_BOARD, spl_board_load_image); +#endif void s_init(void) { diff --git a/arch/arm/mach-uniphier/boot-mode/spl_board.c b/arch/arm/mach-uniphier/boot-mode/spl_board.c index 4eadc2f..e2b202e 100644 --- a/arch/arm/mach-uniphier/boot-mode/spl_board.c +++ b/arch/arm/mach-uniphier/boot-mode/spl_board.c @@ -65,7 +65,7 @@ int uniphier_rom_get_mmc_funcptr(int (**send_cmd)(u32, u32), return 0; } -int spl_board_load_image(struct spl_boot_device *bootdev) +static int spl_board_load_image(struct spl_boot_device *bootdev) { int (*send_cmd)(u32 cmd, u32 arg); int (*card_blockaddr)(u32 rca); @@ -126,3 +126,4 @@ int spl_board_load_image(struct spl_boot_device *bootdev) return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_BOARD, spl_board_load_image); |