From patchwork Mon May 6 09:32:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 241610 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id CC9832C00B5 for ; Mon, 6 May 2013 19:33:35 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7AD044A23B; Mon, 6 May 2013 11:33:31 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pKUkjNDeIwuS; Mon, 6 May 2013 11:33:31 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B35D84A23C; Mon, 6 May 2013 11:33:23 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DC0EE4A1FE for ; Mon, 6 May 2013 11:33:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 2M6FIRaIaDMF for ; Mon, 6 May 2013 11:33:07 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-ea0-f174.google.com (mail-ea0-f174.google.com [209.85.215.174]) by theia.denx.de (Postfix) with ESMTPS id 3B9354A20A for ; Mon, 6 May 2013 11:33:00 +0200 (CEST) Received: by mail-ea0-f174.google.com with SMTP id f15so1596748eak.19 for ; Mon, 06 May 2013 02:32:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:in-reply-to:references:content-type :x-gm-message-state; bh=ldvidQeVsG+KTIn9Hw1WgTdSuBqjZDURj4anBN+Nljk=; b=NYU75arV2N49OiUbWL+rD1KulJuJGTdOOlUJXVnk8IUd8e6yO/8GJ6I5sXyWAb3Dh0 BKpQV7O1uNiDVJWgqew75hkyX27D8wDY+o3J0tbN6h9trJAHYrlWxXRJ0i32uPZT/tm8 w+Ct1W+x2VIzYcNFiaZJ7Wn1ULi8mYJ5Bp7INuqSR/RnLiXsl9wEIxitOaj5fJ0sRqZs OYAEd1P99noy/Mh8rffERa/lJ672o3KiuJLwQvzeGVk/Vg7okFMUC+AZ0nPfmXfpTjwO L3oeK6+Pt3BXXIqgXt5UC6W20xgBmcyzc2PkaABGg83hC19FqQK5WzAfCcDIsmXiZQBc Mgqw== X-Received: by 10.14.3.137 with SMTP id 9mr47266131eeh.0.1367832779088; Mon, 06 May 2013 02:32:59 -0700 (PDT) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id e2sm21070777eem.16.2013.05.06.02.32.58 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 06 May 2013 02:32:58 -0700 (PDT) From: Michal Simek To: u-boot@lists.denx.de, Michal Simek , Tom Rini Date: Mon, 6 May 2013 11:32:50 +0200 Message-Id: X-Mailer: git-send-email 1.8.2.1 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkAurZ5Q9IML+0hmZv3cm55guPT74QE2goWWJ5oHviDkv0MblYRbEKe9XdhCyN69c74RZg8 Cc: Peter Crosthwaite , Jagannadha Sutradharudu Teki Subject: [U-Boot] [PATCH v2 2/2] microblaze: bootm: Add support for loading initrd X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de fdt_initrd add additional information to DTB about initrd addresses which are later used by kernel. Signed-off-by: Michal Simek --- Changes in v2: - Check return value from fdt_initrd arch/microblaze/lib/bootm.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 1.8.2.1 diff --git a/arch/microblaze/lib/bootm.c b/arch/microblaze/lib/bootm.c index b992a4d..3842709 100644 --- a/arch/microblaze/lib/bootm.c +++ b/arch/microblaze/lib/bootm.c @@ -64,6 +64,14 @@ int do_bootm_linux(int flag, int argc, char * const argv[], if (!of_flat_tree && argc > 3) of_flat_tree = (char *)simple_strtoul(argv[3], NULL, 16); + + /* fixup the initrd now that we know where it should be */ + if (images->rd_start && images->rd_end && of_flat_tree) + ret = fdt_initrd(of_flat_tree, images->rd_start, + images->rd_end, 1); + if (ret) + return 1; + #ifdef DEBUG printf("## Transferring control to Linux (at address 0x%08lx) ", (ulong)thekernel);