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 <galak@kernel.crashing.org>
diff --git a/lib_m68k/bootm.c b/lib_m68k/bootm.c
index fe658fe..241721d 100644
--- a/lib_m68k/bootm.c
+++ b/lib_m68k/bootm.c
@@ -50,7 +50,7 @@
{
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 @@
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;