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

login
register
mail settings
Submitter Gabor Juhos
Date Jan. 8, 2013, 7:14 p.m.
Message ID <1357672451-27455-2-git-send-email-juhosg@openwrt.org>
Download mbox | patch
Permalink /patch/210483/
State Rejected
Delegated to: Daniel Schwierzeck
Headers show

Comments

Gabor Juhos - Jan. 8, 2013, 7:14 p.m.
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@openwrt.org>
Cc: Daniel Schwierzeck <daniel.schwierzeck@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(-)

Patch

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;