Skip to content

Commit

Permalink
MIPS: ath79: Read the initrd address from the firmware environment
Browse files Browse the repository at this point in the history
Allow loading an initrd passed by the firmware.

Signed-off-by: Alban Bedel <albeu@free.fr>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/8354/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Alban Bedel authored and Ralf Baechle committed Nov 24, 2014
1 parent 11a0f40 commit ebf71ec
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/mips/ath79/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include <linux/init.h>
#include <linux/io.h>
#include <linux/string.h>
#include <linux/initrd.h>

#include <asm/bootinfo.h>
#include <asm/addrspace.h>
Expand All @@ -23,6 +24,13 @@
void __init prom_init(void)
{
fw_init_cmdline();

/* Read the initrd address from the firmware environment */
initrd_start = fw_getenvl("initrd_start");
if (initrd_start) {
initrd_start = KSEG0ADDR(initrd_start);
initrd_end = initrd_start + fw_getenvl("initrd_size");
}
}

void __init prom_free_prom_memory(void)
Expand Down

0 comments on commit ebf71ec

Please sign in to comment.