From patchwork Wed Sep 26 09:11:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Roese X-Patchwork-Id: 187027 X-Patchwork-Delegate: scottwood@freescale.com 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 760E22C0090 for ; Wed, 26 Sep 2012 19:12:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4483F28077; Wed, 26 Sep 2012 11:12:40 +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 pQifTqraGw-o; Wed, 26 Sep 2012 11:12:39 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A671A28085; Wed, 26 Sep 2012 11:12:27 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2061728085 for ; Wed, 26 Sep 2012 11:12:06 +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 dxo9lYNLB7as for ; Wed, 26 Sep 2012 11:12:05 +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 mo-p05-ob.rzone.de (mo-p05-ob.rzone.de [81.169.146.182]) by theia.denx.de (Postfix) with ESMTPS id B33B128077 for ; Wed, 26 Sep 2012 11:12:02 +0200 (CEST) X-RZG-AUTH: :IW0NeWC7b/q2i6W/qstXb1SBUuFnrGohdvpEkce+Ub40Q/uAFj+9EbzeUD+LtA== X-RZG-CLASS-ID: mo05 Received: from ubuntu-2012.fritz.box (pD9FFA809.dip.t-dialin.net [217.255.168.9]) by smtp.strato.de (jored mo43) (RZmta 30.18 DYNA|AUTH) with ESMTPA id Q02f36o8Q8VxcS ; Wed, 26 Sep 2012 11:11:56 +0200 (CEST) From: Stefan Roese To: u-boot@lists.denx.de Date: Wed, 26 Sep 2012 11:11:54 +0200 Message-Id: <1348650714-28269-1-git-send-email-sr@denx.de> X-Mailer: git-send-email 1.7.12.1 Cc: trini@ti.com Subject: [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup" 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 By calling fdt_chosen(), the chosen node will be updated / created by the "fdt boardsetup" command. This is useful for setting of the kernel commandline via the "bootargs" env variable. With this change, the "fdt boardsetup" can be used to prepare the DT blob for SPL booting. The patched DT blob can be saved to flash and can be used by the SPL U-Boot version directly for Linux booting. Signed-off-by: Stefan Roese --- common/cmd_fdt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/cmd_fdt.c b/common/cmd_fdt.c index e2225c4..d688334 100644 --- a/common/cmd_fdt.c +++ b/common/cmd_fdt.c @@ -425,8 +425,10 @@ int do_fdt (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) } #ifdef CONFIG_OF_BOARD_SETUP /* Call the board-specific fixup routine */ - else if (strncmp(argv[1], "boa", 3) == 0) + else if (strncmp(argv[1], "boa", 3) == 0) { ft_board_setup(working_fdt, gd->bd); + fdt_chosen(working_fdt, 1); + } #endif /* Create a chosen node */ else if (argv[1][0] == 'c') {