Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752071AbaKGLsW (ORCPT ); Fri, 7 Nov 2014 06:48:22 -0500 Received: from dotsec.net ([62.75.224.215]:54073 "EHLO styx.dotsec.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751299AbaKGLsT (ORCPT ); Fri, 7 Nov 2014 06:48:19 -0500 From: Alban Bedel To: linux-kernel@vger.kernel.org Cc: linux-mips@linux-mips.org, Ralf Baechle , Alban Bedel Subject: [PATCH 2/2] MIPS: ath79: Read the initrd address from the firmware environment Date: Fri, 7 Nov 2014 12:44:36 +0100 Message-Id: <1415360676-28064-2-git-send-email-albeu@free.fr> X-Mailer: git-send-email 2.0.0 In-Reply-To: <1415360676-28064-1-git-send-email-albeu@free.fr> References: <1415360676-28064-1-git-send-email-albeu@free.fr> X-SA-Score: -1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Allow loading an initrd passed by the firmware. Signed-off-by: Alban Bedel --- 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 #include #include +#include #include #include @@ -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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/