From: Simon Glass Date: Sun, 18 Sep 2016 13:44:58 -0600 Subject: [U-Boot] [PATCH 09/27] spl: Convert spl_ram_load_image() to use linker list In-Reply-To: <1474227917-9256-1-git-send-email-sjg@chromium.org> References: <1474227917-9256-1-git-send-email-sjg@chromium.org> Message-ID: <1474227917-9256-10-git-send-email-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Add a linker list declaration for this method and remove the explicit switch() code. Signed-off-by: Simon Glass --- 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 719ae6e..4fe5d98 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: -- 2.8.0.rc3.226.g39d4020