lkml.org 
[lkml]   [2014]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/2] MIPS: ath79: Read the initrd address from the firmware environment
Date
Allow loading an initrd passed by the firmware.

Signed-off-by: Alban Bedel <albeu@free.fr>
---
arch/mips/ath79/prom.c | 8 ++++++++
1 file changed, 8 insertions(+)

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)
--
2.0.0


\
 
 \ /
  Last update: 2014-11-07 13:21    [W:0.031 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site