#include <command.h>
#include <part.h>
-#if defined(CONFIG_CMD_IDE) || defined(CONFIG_CMD_SCSI) || \
- defined(CONFIG_USB_STORAGE)
int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
char *const argv[])
{
- int dev, part;
+ __maybe_unused int dev;
+ int part;
ulong addr = CONFIG_SYS_LOAD_ADDR;
ulong cnt;
disk_partition_t info;
#endif
struct blk_desc *dev_desc;
-#if defined(CONFIG_FIT)
+#if CONFIG_IS_ENABLED(FIT)
const void *fit_hdr = NULL;
#endif
cnt = image_get_image_size(hdr);
break;
#endif
-#if defined(CONFIG_FIT)
+#if CONFIG_IS_ENABLED(FIT)
case IMAGE_FORMAT_FIT:
fit_hdr = (const void *) addr;
puts("Fit image detected...\n");
}
bootstage_mark(BOOTSTAGE_ID_IDE_READ);
-#if defined(CONFIG_FIT)
+#if CONFIG_IS_ENABLED(FIT)
/* This cannot be done earlier,
* we need complete FIT image in RAM first */
if (genimg_get_format((void *) addr) == IMAGE_FORMAT_FIT) {
return bootm_maybe_autostart(cmdtp, argv[0]);
}
-#endif