public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [RFC 1/3] MIPS: bootm_qemu_mips.c: separate linux preparation code
@ 2013-01-08 19:14 Gabor Juhos
  2013-01-08 19:14 ` [U-Boot] [RFC 2/3] MIPS: bootm_qemu_mips.c: separate linux jump code Gabor Juhos
  2013-01-08 19:14 ` [U-Boot] [RFC 3/3] MIPS: bootm.c: integrate QEMU specific functions Gabor Juhos
  0 siblings, 2 replies; 6+ messages in thread
From: Gabor Juhos @ 2013-01-08 19:14 UTC (permalink / raw)
  To: u-boot

Move the preparation code into a separate function.
This is just a cosmetic change. The function will be
moved into bootm.c 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 |   28 +++++++++++++++++-----------
 1 file changed, 17 insertions(+), 11 deletions(-)

diff --git a/arch/mips/lib/bootm_qemu_mips.c b/arch/mips/lib/bootm_qemu_mips.c
index 0815c9c..2350a54 100644
--- a/arch/mips/lib/bootm_qemu_mips.c
+++ b/arch/mips/lib/bootm_qemu_mips.c
@@ -29,22 +29,12 @@
 
 DECLARE_GLOBAL_DATA_PTR;
 
-int do_bootm_linux(int flag, int argc, char * const argv[],
-			bootm_headers_t *images)
+static void boot_prep_linux_qemu(bootm_headers_t *images)
 {
-	void (*theKernel) (int, char **, char **, int *);
 	char *bootargs = getenv("bootargs");
 	char *start;
 	uint len;
 
-	/* find kernel entry point */
-	theKernel = (void (*)(int, char **, char **, int *))images->ep;
-
-	bootstage_mark(BOOTSTAGE_ID_RUN_OS);
-
-	debug("## Transferring control to Linux (at address %08lx) ...\n",
-		(ulong) theKernel);
-
 	gd->bd->bi_boot_params = gd->bd->bi_memstart + (16 << 20) - 256;
 	debug("%-12s= 0x%08lX\n", "boot_params", (ulong)gd->bd->bi_boot_params);
 
@@ -67,6 +57,22 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
 		(uint) UNCACHED_SDRAM(images->rd_start),
 		(uint) len);
 	}
+}
+
+int do_bootm_linux(int flag, int argc, char * const argv[],
+			bootm_headers_t *images)
+{
+	void (*theKernel) (int, char **, char **, int *);
+
+	/* find kernel entry point */
+	theKernel = (void (*)(int, char **, char **, int *))images->ep;
+
+	bootstage_mark(BOOTSTAGE_ID_RUN_OS);
+
+	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");
-- 
1.7.10

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-10 16:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-08 19:14 [U-Boot] [RFC 1/3] MIPS: bootm_qemu_mips.c: separate linux preparation code Gabor Juhos
2013-01-08 19:14 ` [U-Boot] [RFC 2/3] MIPS: bootm_qemu_mips.c: separate linux jump code Gabor Juhos
2013-01-08 19:14 ` [U-Boot] [RFC 3/3] MIPS: bootm.c: integrate QEMU specific functions Gabor Juhos
2013-01-10 12:52   ` Gabor Juhos
2013-01-10 14:22     ` Daniel Schwierzeck
2013-01-10 16:15       ` Gabor Juhos

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox