]> 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 843ec6e0c2696380d176740bbb5864b05e46624b..48738ac60524d3b63095a00d6608a66dd1c6aaa0 100644 (file)
 #include <bootm.h>
 #include <command.h>
 #include <environment.h>
+#include <errno.h>
 #include <image.h>
 #include <lmb.h>
 #include <malloc.h>
+#include <mapmem.h>
 #include <nand.h>
 #include <asm/byteorder.h>
 #include <linux/compiler.h>
@@ -77,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;
        }
@@ -184,6 +187,9 @@ static char bootm_help_text[] =
        "\tcmdline - OS specific command line processing/setup\n"
        "\tbdt     - OS specific bd_t processing\n"
        "\tprep    - OS specific prep before relocation or go\n"
+#if defined(CONFIG_TRACE)
+       "\tfake    - OS specific fake start without go\n"
+#endif
        "\tgo      - start OS";
 #endif
 
@@ -574,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;
@@ -715,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;