image: Drop remaining FIT #ifdef

Drop the last one of these, by using a done_select variable to control
whether to fall back to using 'select' as a hex value.

Note that the indentation is not adjusted, to make this easier to review.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2022-08-28 12:32:51 -06:00 committed by Tom Rini
parent 1a68c039c5
commit ca78883fdc

View File

@ -324,12 +324,13 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch,
{ {
const char *fit_uname_config; const char *fit_uname_config;
const char *fit_uname_ramdisk; const char *fit_uname_ramdisk;
bool done_select = !select;
bool done = false; bool done = false;
int rd_noffset; int rd_noffset;
ulong rd_addr; ulong rd_addr;
char *buf; char *buf;
#if CONFIG_IS_ENABLED(FIT) if (CONFIG_IS_ENABLED(FIT)) {
fit_uname_config = images->fit_uname_cfg; fit_uname_config = images->fit_uname_cfg;
fit_uname_ramdisk = NULL; fit_uname_ramdisk = NULL;
@ -350,21 +351,21 @@ static int select_ramdisk(bootm_headers_t *images, const char *select, u8 arch,
&rd_addr, &fit_uname_config)) { &rd_addr, &fit_uname_config)) {
debug("* ramdisk: config '%s' from image at 0x%08lx\n", debug("* ramdisk: config '%s' from image at 0x%08lx\n",
fit_uname_config, rd_addr); fit_uname_config, rd_addr);
done_select = true;
} else if (fit_parse_subimage(select, default_addr, } else if (fit_parse_subimage(select, default_addr,
&rd_addr, &rd_addr,
&fit_uname_ramdisk)) { &fit_uname_ramdisk)) {
debug("* ramdisk: subimage '%s' from image at 0x%08lx\n", debug("* ramdisk: subimage '%s' from image at 0x%08lx\n",
fit_uname_ramdisk, rd_addr); fit_uname_ramdisk, rd_addr);
} else done_select = true;
#endif }
{ }
}
if (!done_select) {
rd_addr = hextoul(select, NULL); rd_addr = hextoul(select, NULL);
debug("* ramdisk: cmdline image address = 0x%08lx\n", debug("* ramdisk: cmdline image address = 0x%08lx\n",
rd_addr); rd_addr);
} }
#if CONFIG_IS_ENABLED(FIT)
}
#endif
if (CONFIG_IS_ENABLED(FIT) && !select) { if (CONFIG_IS_ENABLED(FIT) && !select) {
/* use FIT configuration provided in first bootm /* use FIT configuration provided in first bootm
* command argument. If the property is not defined, * command argument. If the property is not defined,