From c4f9419c6b54958e0eddbcbc9e5a4a7b7ec99865 Mon Sep 17 00:00:00 2001 From: Kumar Gala Date: Fri, 15 Aug 2008 08:24:37 -0500 Subject: bootm: refactor ramdisk locating code Move determing if we have a ramdisk and where its located into the common code. Keep track of the ramdisk start and end in the bootm_headers_t image struct. Signed-off-by: Kumar Gala --- lib_m68k/bootm.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'lib_m68k/bootm.c') diff --git a/lib_m68k/bootm.c b/lib_m68k/bootm.c index fe658fea0c9..241721dad76 100644 --- a/lib_m68k/bootm.c +++ b/lib_m68k/bootm.c @@ -50,7 +50,7 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, { ulong sp; - ulong rd_data_start, rd_data_end, rd_len; + ulong rd_len; ulong initrd_start, initrd_end; int ret; @@ -95,14 +95,8 @@ void do_bootm_linux(cmd_tbl_t * cmdtp, int flag, kernel = (void (*)(bd_t *, ulong, ulong, ulong, ulong))images->ep; - /* find ramdisk */ - ret = boot_get_ramdisk (argc, argv, images, IH_ARCH_M68K, - &rd_data_start, &rd_data_end); - if (ret) - goto error; - - rd_len = rd_data_end - rd_data_start; - ret = boot_ramdisk_high (lmb, rd_data_start, rd_len, + rd_len = images->rd_end - images->rd_start; + ret = boot_ramdisk_high (lmb, images->rd_start, rd_len, &initrd_start, &initrd_end); if (ret) goto error; -- cgit v1.2.3