diff options
author | Alban Bedel <albeu@free.fr> | 2014-11-07 12:44:36 +0100 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2014-11-24 07:45:30 +0100 |
commit | ebf71ec7e14bd55d0114f625686304979ecff4d0 (patch) | |
tree | 5525eedbbefe3e711b62f71fb38ed3bfe2c13f17 /arch/mips | |
parent | 11a0f40bc98d6ae34cb3283e6008abc433e252bb (diff) | |
download | op-kernel-dev-ebf71ec7e14bd55d0114f625686304979ecff4d0.zip op-kernel-dev-ebf71ec7e14bd55d0114f625686304979ecff4d0.tar.gz |
MIPS: ath79: Read the initrd address from the firmware environment
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>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/ath79/prom.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/mips/ath79/prom.c b/arch/mips/ath79/prom.c index 80a0bff..e1fe630 100644 --- a/arch/mips/ath79/prom.c +++ b/arch/mips/ath79/prom.c @@ -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> @@ -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) |