]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
spl: add RAM boot device only if it is actually defined
authorStefan Agner <stefan.agner@toradex.com>
Mon, 21 Nov 2016 18:58:51 +0000 (10:58 -0800)
committerTom Rini <trini@konsulko.com>
Tue, 29 Nov 2016 00:49:49 +0000 (19:49 -0500)
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>
common/spl/spl.c

index bdb165ac2841829e317eb5b733214742cd6eb74c..32b9f1e95cd06e153b7aab21a8b4be81364d9a7a 100644 (file)
@@ -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