Patchwork [U-Boot,RFC,11/22] sparc: Use image_setup_linux() instead of local code

login
register
mail settings
Submitter Simon Glass
Date Jan. 10, 2013, 2:58 p.m.
Message ID <1357829905-6579-12-git-send-email-sjg@chromium.org>
Download mbox | patch
Permalink /patch/211051/
State RFC
Headers show

Comments

Simon Glass - Jan. 10, 2013, 2:58 p.m.
Sparc only really sets up the ramdisk, but we should still use
image_setup_linux() so that setup is common across all architectures
that use the FDT.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
 arch/sparc/lib/bootm.c |   13 ++++++-------
 1 files changed, 6 insertions(+), 7 deletions(-)

Patch

diff --git a/arch/sparc/lib/bootm.c b/arch/sparc/lib/bootm.c
index bcc6358..472f9ac 100644
--- a/arch/sparc/lib/bootm.c
+++ b/arch/sparc/lib/bootm.c
@@ -131,17 +131,16 @@  int do_bootm_linux(int flag, int argc, char * const argv[], bootm_headers_t * im
 	 * extracted and is writeable.
 	 */
 
+	ret = image_setup_boot(images);
+	if (ret) {
+		puts("### Failed to relocate RAM disk\n");
+		goto error;
+	}
+
 	/* Calc length of RAM disk, if zero no ramdisk available */
 	rd_len = images->rd_end - images->rd_start;
 
 	if (rd_len) {
-		ret = boot_ramdisk_high(lmb, images->rd_start, rd_len,
-					&initrd_start, &initrd_end);
-		if (ret) {
-			puts("### Failed to relocate RAM disk\n");
-			goto error;
-		}
-
 		/* Update SPARC kernel header so that Linux knows
 		 * what is going on and where to find RAM disk.
 		 *