]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
bootm: Reduce arguments to boot_get_fpga()
authorSimon Glass <sjg@chromium.org>
Sat, 18 Nov 2023 21:05:11 +0000 (14:05 -0700)
committerTom Rini <trini@konsulko.com>
Wed, 13 Dec 2023 16:51:24 +0000 (11:51 -0500)
This function only uses two arguments. The 'arch' always has a constant
value, so drop it. This simplifies the function call.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
boot/bootm.c
boot/image-board.c
include/image.h

index 5dc9cdeb244f173791eb7124c9aafd616bb90443..ae3fceb392daad433d72fb91873f42012dc8c161 100644 (file)
@@ -555,8 +555,7 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start,
 #if CONFIG_IS_ENABLED(FIT)
        if (IS_ENABLED(CONFIG_FPGA)) {
                /* find bitstreams */
-               ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT,
-                                   NULL, NULL);
+               ret = boot_get_fpga(&images);
                if (ret) {
                        printf("FPGA image is corrupted or invalid\n");
                        return 1;
index 60e514fc150ea0ce9135c580f31ce90075b9b8d8..b926275ec9179916b7ade2ef6a9e8ddecdf65a0b 100644 (file)
@@ -616,8 +616,7 @@ int boot_get_setup(struct bootm_headers *images, u8 arch,
        return boot_get_setup_fit(images, arch, setup_start, setup_len);
 }
 
-int boot_get_fpga(int argc, char *const argv[], struct bootm_headers *images,
-                 u8 arch, const ulong *ld_start, ulong * const ld_len)
+int boot_get_fpga(struct bootm_headers *images)
 {
        ulong tmp_img_addr, img_data, img_len;
        void *buf;
@@ -659,7 +658,7 @@ int boot_get_fpga(int argc, char *const argv[], struct bootm_headers *images,
                                                tmp_img_addr,
                                                (const char **)&uname,
                                                &images->fit_uname_cfg,
-                                               arch,
+                                               IH_ARCH_DEFAULT,
                                                IH_TYPE_FPGA,
                                                BOOTSTAGE_ID_FPGA_INIT,
                                                FIT_LOAD_OPTIONAL_NON_ZERO,
index 04f35de9d0823475863c6288b29d5cfcddb9e87b..63f2bd3b37139bcb5b5e6e91427d601927b15a70 100644 (file)
@@ -642,8 +642,13 @@ ulong genimg_get_kernel_addr(char * const img_addr);
 int genimg_get_format(const void *img_addr);
 int genimg_has_config(struct bootm_headers *images);
 
-int boot_get_fpga(int argc, char *const argv[], struct bootm_headers *images,
-                 uint8_t arch, const ulong *ld_start, ulong * const ld_len);
+/**
+ * boot_get_fpga() - Locate the FPGA image
+ *
+ * @images: Information about images being loaded
+ * Return 0 if OK, non-zero on failure
+ */
+int boot_get_fpga(struct bootm_headers *images);
 
 /**
  * boot_get_ramdisk() - Locate the ramdisk