diff mbox

[U-Boot,RFC,10/22] m68k: Use image_setup_linux() instead of local code

Message ID 1357829905-6579-11-git-send-email-sjg@chromium.org
State RFC
Headers show

Commit Message

Simon Glass Jan. 10, 2013, 2:58 p.m. UTC
Rather than having similar code in m68k, use image_setup_linux() which
should be common across all architectures that use the FDT.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/m68k/lib/bootm.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

Comments

Marek Vasut Jan. 11, 2013, 11:11 a.m. UTC | #1
Dear Simon Glass,

> Rather than having similar code in m68k, use image_setup_linux() which
> should be common across all architectures that use the FDT.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Marek Vasut <marex@denx.de>

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/arch/m68k/lib/bootm.c b/arch/m68k/lib/bootm.c
index d506d0c..56b6512 100644
--- a/arch/m68k/lib/bootm.c
+++ b/arch/m68k/lib/bootm.c
@@ -78,13 +78,6 @@  int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
 	if ((flag != 0) && (flag != BOOTM_STATE_OS_GO))
 		return 1;
 
-	/* allocate space and init command line */
-	ret = boot_get_cmdline (lmb, &cmd_start, &cmd_end);
-	if (ret) {
-		puts("ERROR with allocation of cmdline\n");
-		goto error;
-	}
-
 	/* allocate space for kernel copy of board info */
 	ret = boot_get_kbd (lmb, &kbd);
 	if (ret) {
@@ -93,14 +86,12 @@  int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t *ima
 	}
 	set_clocks_in_mhz(kbd);
 
-	kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))images->ep;
-
-	rd_len = images->rd_end - images->rd_start;
-	ret = boot_ramdisk_high (lmb, images->rd_start, rd_len,
-			&initrd_start, &initrd_end);
+	ret = image_setup_linux(images);
 	if (ret)
 		goto error;
 
+	kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))images->ep;
+
 	debug("## Transferring control to Linux (at address %08lx) ...\n",
 	      (ulong) kernel);