]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
avr32/m68k/microblaze/nds32/nios2/openrisc/sh/sparc: fix do_bootm_linux
authorAndreas Bießmann <andreas.devel@googlemail.com>
Tue, 2 Jul 2013 11:57:44 +0000 (13:57 +0200)
committerTom Rini <trini@ti.com>
Tue, 2 Jul 2013 13:17:17 +0000 (09:17 -0400)
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>
arch/avr32/lib/bootm.c
arch/m68k/lib/bootm.c
arch/microblaze/lib/bootm.c
arch/nds32/lib/bootm.c
arch/nios2/lib/bootm.c
arch/openrisc/lib/bootm.c
arch/sh/lib/bootm.c
arch/sparc/lib/bootm.c

index 87f3f9c35d3b966c5366351c60d06ebc1b72c825..eedab9d11944e9d78b028d12770a13f3003eff31 100644 (file)
@@ -187,6 +187,15 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
        struct  tag *params, *params_start;
        char    *commandline = getenv("bootargs");
 
+       /*
+        * allow the PREP bootm subcommand, it is required for bootm to work
+        *
+        * TODO: Andreas Bießmann <andreas.devel@googlemail.com> refactor the
+        * do_bootm_linux() for avr32
+        */
+       if (flag & BOOTM_STATE_OS_PREP)
+               return 0;
+
        if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
                return 1;
 
index 56b6512be059e7b976eb1fab3d1684f49fee31f8..cc45167fcd584077d093fb4939dec4e8fae08669 100644 (file)
@@ -75,6 +75,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
        void  (*kernel) (bd_t *, ulong, ulong, ulong, ulong);
        struct lmb *lmb = &images->lmb;
 
+       /*
+        * 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;
 
index b328f9497161c57424f2c3b87e63afd6cd2ba671..c5dfc9ebe8c5a9e062bda89cec8d09cf85d8e95e 100644 (file)
@@ -40,6 +40,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
        char    *commandline = getenv("bootargs");
        ulong   rd_data_start, rd_data_end;
 
+       /*
+        * 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;
 
index 03f58bf321a4985d125d02df8f546a0844976ab6..65ae1eb7157ec6face1cbc24d02c407ab37c5f4c 100644 (file)
@@ -58,6 +58,12 @@ int do_bootm_linux(int flag, int argc, char *argv[], bootm_headers_t *images)
        char *commandline = getenv("bootargs");
 #endif
 
+       /*
+        * 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;
 
index 114e146d9b3d0af8ccfe0c6b685d376a1bd6c099..51597ea6fdc35fde6e4ac87f2f225cc596c6167e 100644 (file)
@@ -45,6 +45,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
        if (of_flat_tree)
                initrd_end = (ulong)of_flat_tree;
 
+       /*
+        * 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;
 
index 7f716b85982f957896c5a13b9164f5069a8fc2e0..24ca0a724980813c895bc7dce104f399e62c28fe 100644 (file)
@@ -41,6 +41,12 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
        void    (*kernel) (unsigned int);
        ulong   rd_data_start, rd_data_end;
 
+       /*
+        * 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;
 
index 57273fa4437da6a34096b3e2823cc4a2e1301506..4fdc7aab74577e3dadd68473b4cbf2e0bb1b26e6 100644 (file)
@@ -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;
 
index 1a9343c108263a0a3c28512669a201504b08a046..9e5fb40df8083302c06a3905aca6196c9f640281 100644 (file)
@@ -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;