]> git.sur5r.net Git - u-boot/blobdiff - cmd/disk.c
video, da8xx-fb: fix time out in wait_for_event()
[u-boot] / cmd / disk.c
index e0219f810e381d0dcd6584903b787ec7d38a80c1..3d2a3d22045b76b0668c8ee59b6da047bfc0c3f8 100644 (file)
@@ -8,12 +8,11 @@
 #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;
@@ -22,7 +21,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
 #endif
        struct blk_desc *dev_desc;
 
-#if defined(CONFIG_FIT)
+#if CONFIG_IS_ENABLED(FIT)
        const void *fit_hdr = NULL;
 #endif
 
@@ -82,7 +81,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
                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");
@@ -108,7 +107,7 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
        }
        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) {
@@ -129,4 +128,3 @@ int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
 
        return bootm_maybe_autostart(cmdtp, argv[0]);
 }
-#endif