]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_bootm.c
net: fec_mxc: use some more appropriate return values
[karo-tx-uboot.git] / common / cmd_bootm.c
index 48199bfff3ed75a232ba3905cb4fe8662b09e321..48738ac60524d3b63095a00d6608a66dd1c6aaa0 100644 (file)
@@ -16,6 +16,7 @@
 #include <image.h>
 #include <lmb.h>
 #include <malloc.h>
+#include <mapmem.h>
 #include <nand.h>
 #include <asm/byteorder.h>
 #include <linux/compiler.h>
@@ -78,7 +79,8 @@ static int do_bootm_subcommand(cmd_tbl_t *cmdtp, int flag, int argc,
                return CMD_RET_USAGE;
        }
 
-       if (state != BOOTM_STATE_START && images.state >= state) {
+       if (((state & BOOTM_STATE_START) != BOOTM_STATE_START) &&
+           images.state >= state) {
                printf("Trying to execute a command out of order\n");
                return CMD_RET_USAGE;
        }
@@ -578,7 +580,7 @@ static int bootz_start(cmd_tbl_t *cmdtp, int flag, int argc,
         * Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not
         * have a header that provide this informaiton.
         */
-       if (bootm_find_ramdisk_fdt(flag, argc, argv))
+       if (bootm_find_images(flag, argc, argv))
                return 1;
 
        return 0;
@@ -719,7 +721,7 @@ static int booti_start(cmd_tbl_t *cmdtp, int flag, int argc,
         * Handle the BOOTM_STATE_FINDOTHER state ourselves as we do not
         * have a header that provide this informaiton.
         */
-       if (bootm_find_ramdisk_fdt(flag, argc, argv))
+       if (bootm_find_images(flag, argc, argv))
                return 1;
 
        return 0;