image: Remove ifdefs around image_setup_linux() el at
authorSimon Glass <sjg@chromium.org>
Sat, 25 Sep 2021 13:03:20 +0000 (07:03 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 8 Oct 2021 19:53:26 +0000 (15:53 -0400)
Drop some more ifdefs in image-board.c and also the FPGA part of bootm.c
which calls into it.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/bootm.c
common/image-board.c

index ea71522..fe17d1d 100644 (file)
@@ -296,15 +296,15 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start,
 #endif
 
 #if IMAGE_ENABLE_FIT
-#if defined(CONFIG_FPGA)
-       /* find bitstreams */
-       ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT,
-                           NULL, NULL);
-       if (ret) {
-               printf("FPGA image is corrupted or invalid\n");
-               return 1;
+       if (IS_ENABLED(CONFIG_FPGA)) {
+               /* find bitstreams */
+               ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT,
+                                   NULL, NULL);
+               if (ret) {
+                       printf("FPGA image is corrupted or invalid\n");
+                       return 1;
+               }
        }
-#endif
 
        /* find all of the loadables */
        ret = boot_get_loadable(argc, argv, &images, IH_ARCH_DEFAULT,
index 898f0a2..1d6842f 100644 (file)
@@ -814,7 +814,6 @@ int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images,
 }
 #endif
 
-#ifdef CONFIG_SYS_BOOT_GET_CMDLINE
 /**
  * boot_get_cmdline - allocate and initialize kernel cmdline
  * @lmb: pointer to lmb handle, will be used for memory mgmt
@@ -853,9 +852,7 @@ int boot_get_cmdline(struct lmb *lmb, ulong *cmd_start, ulong *cmd_end)
 
        return 0;
 }
-#endif /* CONFIG_SYS_BOOT_GET_CMDLINE */
 
-#ifdef CONFIG_SYS_BOOT_GET_KBD
 /**
  * boot_get_kbd - allocate and initialize kernel copy of board info
  * @lmb: pointer to lmb handle, will be used for memory mgmt
@@ -883,15 +880,14 @@ int boot_get_kbd(struct lmb *lmb, struct bd_info **kbd)
 
        debug("## kernel board info at 0x%08lx\n", (ulong)*kbd);
 
-#if defined(DEBUG) && defined(CONFIG_CMD_BDI)
-       do_bdinfo(NULL, 0, 0, NULL);
+#if defined(DEBUG)
+       if (IS_ENABLED(CONFIG_CMD_BDI)
+               do_bdinfo(NULL, 0, 0, NULL);
 #endif
 
        return 0;
 }
-#endif /* CONFIG_SYS_BOOT_GET_KBD */
 
-#ifdef CONFIG_LMB
 int image_setup_linux(bootm_headers_t *images)
 {
        ulong of_size = images->ft_len;
@@ -925,7 +921,6 @@ int image_setup_linux(bootm_headers_t *images)
 
        return 0;
 }
-#endif /* CONFIG_LMB */
 
 void genimg_print_size(uint32_t size)
 {