bootm: Reduce arguments to boot_get_fpga()
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>
diff --git a/boot/bootm.c b/boot/bootm.c
index 5dc9cde..ae3fceb 100644
--- a/boot/bootm.c
+++ b/boot/bootm.c
@@ -555,8 +555,7 @@
#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;
diff --git a/boot/image-board.c b/boot/image-board.c
index 60e514f..b926275 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -616,8 +616,7 @@
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 @@
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,
diff --git a/include/image.h b/include/image.h
index 04f35de..63f2bd3 100644
--- a/include/image.h
+++ b/include/image.h
@@ -642,8 +642,13 @@
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