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>
This commit is contained in:
Simon Glass 2023-11-18 14:05:11 -07:00 committed by Tom Rini
parent 0aa923aba5
commit 745367b218
3 changed files with 10 additions and 7 deletions

View File

@ -555,8 +555,7 @@ int bootm_find_images(int flag, int argc, char *const argv[], ulong start,
#if CONFIG_IS_ENABLED(FIT) #if CONFIG_IS_ENABLED(FIT)
if (IS_ENABLED(CONFIG_FPGA)) { if (IS_ENABLED(CONFIG_FPGA)) {
/* find bitstreams */ /* find bitstreams */
ret = boot_get_fpga(argc, argv, &images, IH_ARCH_DEFAULT, ret = boot_get_fpga(&images);
NULL, NULL);
if (ret) { if (ret) {
printf("FPGA image is corrupted or invalid\n"); printf("FPGA image is corrupted or invalid\n");
return 1; return 1;

View 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); return boot_get_setup_fit(images, arch, setup_start, setup_len);
} }
int boot_get_fpga(int argc, char *const argv[], struct bootm_headers *images, int boot_get_fpga(struct bootm_headers *images)
u8 arch, const ulong *ld_start, ulong * const ld_len)
{ {
ulong tmp_img_addr, img_data, img_len; ulong tmp_img_addr, img_data, img_len;
void *buf; void *buf;
@ -659,7 +658,7 @@ int boot_get_fpga(int argc, char *const argv[], struct bootm_headers *images,
tmp_img_addr, tmp_img_addr,
(const char **)&uname, (const char **)&uname,
&images->fit_uname_cfg, &images->fit_uname_cfg,
arch, IH_ARCH_DEFAULT,
IH_TYPE_FPGA, IH_TYPE_FPGA,
BOOTSTAGE_ID_FPGA_INIT, BOOTSTAGE_ID_FPGA_INIT,
FIT_LOAD_OPTIONAL_NON_ZERO, FIT_LOAD_OPTIONAL_NON_ZERO,

View File

@ -642,8 +642,13 @@ ulong genimg_get_kernel_addr(char * const img_addr);
int genimg_get_format(const void *img_addr); int genimg_get_format(const void *img_addr);
int genimg_has_config(struct bootm_headers *images); 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 * boot_get_ramdisk() - Locate the ramdisk