Skip to contentSkip to conversation

spl: ram: Convert to CONFIG_IS_ENABLED

PATCH In review Marek Vasut 2 participants 2 messages Apr 7, 2018 – Apr 11, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl: ram: Convert to CONFIG_IS_ENABLED

This patch is a preparation for adding TPL support for RAM loading. CONFIG_IS_ENABLED allows for proper handling of the U-Boot/SPL/TPL differences in config symbol names.

---
 common/spl/spl_ram.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
common/spl/spl_ram.c +3 -3
index d9db9f3a40..a15761e309 100644
@@ -36,7 +36,7 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
 
 	header = (struct image_header *)CONFIG_SPL_LOAD_FIT_ADDRESS;
 
-#if defined(CONFIG_SPL_DFU_SUPPORT)
+#if CONFIG_IS_ENABLED(DFU_SUPPORT)
 	if (bootdev->boot_device == BOOT_DEVICE_DFU)
 		spl_dfu_cmd(0, "dfu_alt_info_ram", "ram", "0");
 #endif
@@ -74,10 +74,10 @@ static int spl_ram_load_image(struct spl_image_info *spl_image,
 
 	return 0;
 }
-#if defined(CONFIG_SPL_RAM_DEVICE)
+#if CONFIG_IS_ENABLED(RAM_DEVICE)
 SPL_LOAD_IMAGE_METHOD("RAM", 0, BOOT_DEVICE_RAM, spl_ram_load_image);
 #endif
-#if defined(CONFIG_SPL_DFU_SUPPORT)
+#if CONFIG_IS_ENABLED(DFU_SUPPORT)
 SPL_LOAD_IMAGE_METHOD("DFU", 0, BOOT_DEVICE_DFU, spl_ram_load_image);
 #endif
 
Signature · 1 line
2.16.2
#1 lore raw
Quoted 6 lines · Marek Vasut

This patch is a preparation for adding TPL support for RAM loading. CONFIG_IS_ENABLED allows for proper handling of the U-Boot/SPL/TPL differences in config symbol names.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180411/0fc31bc0/attachment.sig>