
Add a linker list declaration for this method and remove the explicit switch() code.
Signed-off-by: Simon Glass sjg@chromium.org ---
Changes in v2: None
common/spl/spl.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/common/spl/spl.c b/common/spl/spl.c index 4c3784c..2bba423 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -215,6 +215,7 @@ static int spl_ram_load_image(struct spl_boot_device *bootdev)
return 0; } +SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_RAM, spl_ram_load_image); #endif
int spl_init(void) @@ -372,10 +373,6 @@ static int spl_load_image(u32 boot_device) return loader->load_image(&bootdev);
switch (boot_device) { -#ifdef CONFIG_SPL_RAM_DEVICE - case BOOT_DEVICE_RAM: - return spl_ram_load_image(&bootdev); -#endif #ifdef CONFIG_SPL_MMC_SUPPORT case BOOT_DEVICE_MMC1: case BOOT_DEVICE_MMC2: