public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup"
Date: Wed, 26 Sep 2012 11:11:54 +0200	[thread overview]
Message-ID: <1348650714-28269-1-git-send-email-sr@denx.de> (raw)

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 <sr@denx.de>
---

 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') {
-- 
1.7.12.1

             reply	other threads:[~2012-09-26  9:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-26  9:11 Stefan Roese [this message]
2012-09-26 13:36 ` [U-Boot] [PATCH v3 6/8] fdt: cmd_fdt: Call fdt_chosen() from "fdt boardsetup" Kumar Gala
2012-09-26 14:20   ` Stefan Roese
2012-09-27 20:28     ` Kumar Gala
2012-09-27 20:43       ` McClintock Matthew-B29882
2012-10-02 10:26         ` Stefan Roese
2012-10-03  0:57           ` McClintock Matthew-B29882
2012-10-04  7:43             ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1348650714-28269-1-git-send-email-sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox