summaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/bootm.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/lib/bootm.c')
-rw-r--r--arch/mips/lib/bootm.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/arch/mips/lib/bootm.c b/arch/mips/lib/bootm.c
index 71bb0d2a19..e0722d20d1 100644
--- a/arch/mips/lib/bootm.c
+++ b/arch/mips/lib/bootm.c
@@ -6,10 +6,7 @@
*/
#include <common.h>
-#include <command.h>
#include <image.h>
-#include <u-boot/zlib.h>
-#include <asm/byteorder.h>
#include <asm/addrspace.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -52,6 +49,20 @@ void arch_lmb_reserve(struct lmb *lmb)
lmb_reserve(lmb, sp, CONFIG_SYS_SDRAM_BASE + gd->ram_size - sp);
}
+static int boot_setup_linux(bootm_headers_t *images)
+{
+ int ret;
+ ulong rd_len;
+
+ rd_len = images->rd_end - images->rd_start;
+ ret = boot_ramdisk_high(&images->lmb, images->rd_start,
+ rd_len, &images->initrd_start, &images->initrd_end);
+ if (ret)
+ return ret;
+
+ return 0;
+}
+
static void linux_cmdline_init(void)
{
linux_argc = 1;
@@ -224,6 +235,8 @@ static void boot_jump_linux(bootm_headers_t *images)
int do_bootm_linux(int flag, int argc, char * const argv[],
bootm_headers_t *images)
{
+ int ret;
+
/* No need for those on MIPS */
if (flag & BOOTM_STATE_OS_BD_T)
return -1;
@@ -243,6 +256,10 @@ int do_bootm_linux(int flag, int argc, char * const argv[],
return 0;
}
+ ret = boot_setup_linux(images);
+ if (ret)
+ return ret;
+
boot_cmdline_linux(images);
boot_prep_linux(images);
boot_jump_linux(images);
OpenPOWER on IntegriCloud