summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2013-06-11 11:14:47 -0700
committerTom Rini <trini@ti.com>2013-06-26 10:18:56 -0400
commit35fc84fa1ff51e15ecd3e464dac87eb105ffed30 (patch)
tree3f0340784cc9bb7f21fc38d37152897248a75db1 /include
parent983c72f479173bced296f7292b4a9fbef9d17688 (diff)
downloadu-boot-imx-35fc84fa1ff51e15ecd3e464dac87eb105ffed30.zip
u-boot-imx-35fc84fa1ff51e15ecd3e464dac87eb105ffed30.tar.gz
u-boot-imx-35fc84fa1ff51e15ecd3e464dac87eb105ffed30.tar.bz2
Refactor the bootm command to reduce code duplication
At present the bootm code is mostly duplicated for the plain 'bootm' command and its sub-command variant. This makes the code harder to maintain and means that changes must be made to several places. Introduce do_bootm_states() which performs selected portions of the bootm work, so that both plain 'bootm' and 'bootm <sub_command>' can use the same code. Additional duplication exists in bootz, so tidy that up as well. This is not intended to change behaviour, apart from minor fixes where the previously-duplicated code missed some chunks of code. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r--include/image.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/include/image.h b/include/image.h
index 8ccc00b..8675a82 100644
--- a/include/image.h
+++ b/include/image.h
@@ -320,13 +320,15 @@ typedef struct bootm_headers {
int verify; /* getenv("verify")[0] != 'n' */
#define BOOTM_STATE_START (0x00000001)
-#define BOOTM_STATE_LOADOS (0x00000002)
-#define BOOTM_STATE_RAMDISK (0x00000004)
-#define BOOTM_STATE_FDT (0x00000008)
-#define BOOTM_STATE_OS_CMDLINE (0x00000010)
-#define BOOTM_STATE_OS_BD_T (0x00000020)
-#define BOOTM_STATE_OS_PREP (0x00000040)
-#define BOOTM_STATE_OS_GO (0x00000080)
+#define BOOTM_STATE_FINDOS (0x00000002)
+#define BOOTM_STATE_FINDOTHER (0x00000004)
+#define BOOTM_STATE_LOADOS (0x00000008)
+#define BOOTM_STATE_RAMDISK (0x00000010)
+#define BOOTM_STATE_FDT (0x00000020)
+#define BOOTM_STATE_OS_CMDLINE (0x00000040)
+#define BOOTM_STATE_OS_BD_T (0x00000080)
+#define BOOTM_STATE_OS_PREP (0x00000100)
+#define BOOTM_STATE_OS_GO (0x00000200)
int state;
#ifdef CONFIG_LMB