summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorStefan Agner <stefan.agner@toradex.com>2016-11-21 10:58:51 -0800
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2017-01-11 21:22:25 +0100
commitd3fed25290a32bf5643694608a2627a611bafc8d (patch)
tree8df060d247a6dd8156e59a056b8ff4db88acbcc9 /common
parent2533000f4be36f4ea607e9c467046f8ada756139 (diff)
spl: add RAM boot device only if it is actually defined
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> (cherry picked from commit 34ee947ac3be7a79b89fa8bb690379651cc9598a)
Diffstat (limited to 'common')
-rw-r--r--common/spl/spl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index bdb165ac284..32b9f1e95cd 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