From 2cb0e55a3cd737be1d228a9f90b3d34fab0d0d46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Bie=C3=9Fmann?= Date: Tue, 2 Jul 2013 13:57:44 +0200 Subject: avr32/m68k/microblaze/nds32/nios2/openrisc/sh/sparc: fix do_bootm_linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 [trini: Apply to m68k, microblaze, nds32, nios2, openrisc, sh and sparc] Signed-off-by: Tom Rini --- arch/sparc/lib/bootm.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'arch/sparc/lib/bootm.c') diff --git a/arch/sparc/lib/bootm.c b/arch/sparc/lib/bootm.c index 1a9343c..9e5fb40 100644 --- a/arch/sparc/lib/bootm.c +++ b/arch/sparc/lib/bootm.c @@ -99,6 +99,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t * im void (*kernel) (struct linux_romvec *, void *); int ret; + /* + * 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; -- cgit v1.1