Message ID | 20161121185853.11300-2-stefan@agner.ch |
---|---|
State | Accepted |
Commit | 34ee947ac3be7a79b89fa8bb690379651cc9598a |
Delegated to: | Tom Rini |
Headers | show |
Hi Stefan, On 21 November 2016 at 11:58, Stefan Agner <stefan@agner.ch> wrote: > From: Stefan Agner <stefan.agner@toradex.com> > > Some devices (e.g. dra7xx) support loading to RAM using DFU without > having direct boot from RAM support. Make sure the linker list > does not contain BOOT_DEVICE_RAM if CONFIG_SPL_RAM_DEVICE is not > enabled. > > Fixes: 98136b2f26fa ("spl: Convert spl_ram_load_image() to use linker list") > > Signed-off-by: Stefan Agner <stefan.agner@toradex.com> > Acked-by: Lukasz Majewski <l.majewski@samsung.com> > --- > > Changes in v4: > - Use correct config CONFIG_SPL_RAM_DEVICE to descide whether to add > BOOT_DEVICE_RAM to linker list. > > Changes in v3: None > Changes in v2: > - Use CONFIG_SPL_RAM_SUPPORT to descide whether to compile the > function in first place. > > common/spl/spl.c | 2 ++ > 1 file changed, 2 insertions(+) Can you put this into a separate spl_ram.c file? - Simon
On Mon, Nov 21, 2016 at 10:58:51AM -0800, Stefan Agner wrote: > From: Stefan Agner <stefan.agner@toradex.com> > > Some devices (e.g. dra7xx) support loading to RAM using DFU without > having direct boot from RAM support. Make sure the linker list > does not contain BOOT_DEVICE_RAM if CONFIG_SPL_RAM_DEVICE is not > enabled. > > Fixes: 98136b2f26fa ("spl: Convert spl_ram_load_image() to use linker list") > > Signed-off-by: Stefan Agner <stefan.agner@toradex.com> > Acked-by: Lukasz Majewski <l.majewski@samsung.com> Applied to u-boot/master, thanks!
diff --git a/common/spl/spl.c b/common/spl/spl.c index bdb165a..32b9f1e 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -220,7 +220,9 @@ static int spl_ram_load_image(struct spl_image_info *spl_image, return 0; } +#if defined(CONFIG_SPL_RAM_DEVICE) SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_RAM, spl_ram_load_image); +#endif #if defined(CONFIG_SPL_DFU_SUPPORT) SPL_LOAD_IMAGE_METHOD(0, BOOT_DEVICE_DFU, spl_ram_load_image); #endif