[U-Boot] [RFC 2/3] MIPS: bootm_qemu_mips.c: separate linux jump code

Gabor Juhos juhosg at openwrt.org
Tue Jan 8 20:14:10 CET 2013


Move the actual jump code into a separate function.
This is just a cosmetic change. The function will be
remved by a subsequent change.

Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck at googlemail.com>
---
This is compile tested only. I don't have suitable kernel
images for mips,mipsel,mips64,mipsel64 systems to try it yet.

-Gabor
---
 arch/mips/lib/bootm_qemu_mips.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/mips/lib/bootm_qemu_mips.c b/arch/mips/lib/bootm_qemu_mips.c
index 2350a54..a920305 100644
--- a/arch/mips/lib/bootm_qemu_mips.c
+++ b/arch/mips/lib/bootm_qemu_mips.c
@@ -59,8 +59,7 @@ static void boot_prep_linux_qemu(bootm_headers_t *images)
 	}
 }
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
-			bootm_headers_t *images)
+static void boot_jump_linux_qemu(bootm_headers_t *images)
 {
 	void (*theKernel) (int, char **, char **, int *);
 
@@ -72,12 +71,17 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
 	debug("## Transferring control to Linux (at address %08lx) ...\n",
 		(ulong) theKernel);
 
-	boot_prep_linux_qemu(images);
-
 	/* we assume that the kernel is in place */
 	printf("\nStarting kernel ...\n\n");
 
 	theKernel(0, NULL, NULL, 0);
+}
+
+int do_bootm_linux(int flag, int argc, char * const argv[],
+			bootm_headers_t *images)
+{
+	boot_prep_linux_qemu(images);
+	boot_jump_linux_qemu(images);
 
 	/* does not return */
 	return 1;
-- 
1.7.10



More information about the U-Boot mailing list