summaryrefslogtreecommitdiff
path: root/arch/mips
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-01-07 02:53:42 +0000
committerDaniel Schwierzeck <daniel.schwierzeck@gmail.com>2013-01-16 10:52:07 +0100
commit9c170e2ef4ad2bd246c22c93824d754224c4929a (patch)
treee7ad15696464868a06fcb63a0b6829f0cb4276f4 /arch/mips
parent0ea7213f63f580aa679a36795831dabd35d786aa (diff)
downloadu-boot-imx-9c170e2ef4ad2bd246c22c93824d754224c4929a.zip
u-boot-imx-9c170e2ef4ad2bd246c22c93824d754224c4929a.tar.gz
u-boot-imx-9c170e2ef4ad2bd246c22c93824d754224c4929a.tar.bz2
MIPS: bootm.c: add support for 'prep' and 'go' subcommands
The bootm command supports subcommands since long time however those subcommands are not yet usable on MIPS. The patch is based on the ARM implementation, and it adds support for the 'prep' and 'go' subcommands only. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: Daniel Schwierzeck <daniel.schwierzeck@googlemail.com>
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/lib/bootm.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 8c2e508..a36154a 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -104,8 +104,19 @@ static void boot_jump_linux(bootm_headers_t *images)
int do_bootm_linux(int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
- if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
- return 1;
+ /* No need for those on MIPS */
+ if (flag & BOOTM_STATE_OS_BD_T || flag & BOOTM_STATE_OS_CMDLINE)
+ return -1;
+
+ if (flag & BOOTM_STATE_OS_PREP) {
+ boot_prep_linux(images);
+ return 0;
+ }
+
+ if (flag & BOOTM_STATE_OS_GO) {
+ boot_jump_linux(images);
+ return 0;
+ }
boot_prep_linux(images);
boot_jump_linux(images);