diff options
author | Andreas Bießmann <andreas.devel@googlemail.com> | 2013-07-02 13:57:44 +0200 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-07-02 09:17:17 -0400 |
commit | 2cb0e55a3cd737be1d228a9f90b3d34fab0d0d46 (patch) | |
tree | d1fa4cc5f2de7f08a29020e65a3fd1f9988ffbcd /arch/sh | |
parent | 5a34d9bf31a021987f97f20aefa812b97b58584e (diff) | |
download | u-boot-imx-2cb0e55a3cd737be1d228a9f90b3d34fab0d0d46.zip u-boot-imx-2cb0e55a3cd737be1d228a9f90b3d34fab0d0d46.tar.gz u-boot-imx-2cb0e55a3cd737be1d228a9f90b3d34fab0d0d46.tar.bz2 |
avr32/m68k/microblaze/nds32/nios2/openrisc/sh/sparc: fix do_bootm_linux
Commit 35fc84fa1ff51e15ecd3e464dac87eb105ffed30 broke bootm on avr32. It
requires to call do_bootm_linux() with flag set to BOOTM_STATE_OS_PREP before
calling it again with flag set to BOOTM_STATE_OS_GO.
Fix this by allowing flag set to BOOTM_STATE_OS_PREP, this however will
require a complete refactoring later on.
Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
[trini: Apply to m68k, microblaze, nds32, nios2, openrisc, sh and sparc]
Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/lib/bootm.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/sh/lib/bootm.c b/arch/sh/lib/bootm.c index 57273fa..4fdc7aa 100644 --- a/arch/sh/lib/bootm.c +++ b/arch/sh/lib/bootm.c @@ -79,6 +79,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima unsigned long size = images->ep - (unsigned long)param; char *bootargs = getenv("bootargs"); + /* + * allow the PREP bootm subcommand, it is required for bootm to work + */ + if (flag & BOOTM_STATE_OS_PREP) + return 0; + if ((flag != 0) && (flag != BOOTM_STATE_OS_GO)) return 1; |