All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH 2/3] fdt: Fixup compile error and add a new OF manipulation option
@ 2008-02-12  1:11 Bryan O'Donoghue
  2008-02-12 13:27 ` Jerry Van Baren
  0 siblings, 1 reply; 6+ messages in thread
From: Bryan O'Donoghue @ 2008-02-12  1:11 UTC (permalink / raw)
  To: u-boot

Greetings.

This patch fixes up a compile error that crept with with debug switched on.
Introduces CONFIG_OF_CHOSEN_UPDATE - which is useful if you have a /chosen
entry in the dts - which doesn't contain a bootargs entry - in which case you'd
want u-boot's version of this.

Signed-off-by: Bryan O'Donoghue <bodonoghue@codehermit.ie>
---

diff --git a/README b/README
index 26f93c2..bc7a6a4 100644
--- a/README
+++ b/README
@@ -375,6 +375,11 @@ The following options need to be configured:
 		This define fills in the correct boot cpu in the boot
 		param header, the default value is zero if undefined.
 
+		CONFIG_OF_CHOSEN_UPDATE
+
+		This define adds or updates a bootargs field to the /chosen
+		entry.
+
 - Serial Ports:
 		CFG_PL010_SERIAL
 
diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c
index 9546729..c729f52 100644
--- a/common/cmd_bootm.c
+++ b/common/cmd_bootm.c
@@ -975,7 +975,11 @@ do_bootm_linux (cmd_tbl_t *cmdtp, int flag,
 	 * if the user wants it (the logic is in the subroutines).
 	 */
 	if (of_flat_tree) {
-		if (fdt_chosen(of_flat_tree, initrd_start, initrd_end, 0) < 0) {
+#ifdef CONFIG_OF_CHOSEN_UPDATE
+	if (fdt_chosen(of_flat_tree, initrd_start, initrd_end, 1) < 0) {
+#else
+	if (fdt_chosen(of_flat_tree, initrd_start, initrd_end, 0) < 0) {
+#endif
 			puts ("ERROR: /chosen node create failed - "
 				"must RESET the board to recover.\n");
 			do_reset (cmdtp, flag, argc, argv);
diff --git a/common/fdt_support.c b/common/fdt_support.c
index b5ee6e9..ba1306c 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -408,7 +408,7 @@ void do_fixup_by_path(void *fdt, const char *path, const char *prop,
 {
 #if defined(DEBUG)
 	int i;
-	debug("Updating property '%s/%s' = ", node, prop);
+	debug("Updating property '%s/%s' = ", path, prop);
 	for (i = 0; i < len; i++)
 		debug(" %.2x", *(u8*)(val+i));
 	debug("\n");
@@ -434,7 +434,7 @@ void do_fixup_by_prop(void *fdt,
 	int off;
 #if defined(DEBUG)
 	int i;
-	debug("Updating property '%s/%s' = ", node, prop);
+	debug("Updating property '%s/%s' = ", pname, prop);
 	for (i = 0; i < len; i++)
 		debug(" %.2x", *(u8*)(val+i));
 	debug("\n");
@@ -461,7 +461,7 @@ void do_fixup_by_compat(void *fdt, const char *compat,
 	int off = -1;
 #if defined(DEBUG)
 	int i;
-	debug("Updating property '%s/%s' = ", node, prop);
+	debug("Updating property '%s/%s' = ", compat, prop);
 	for (i = 0; i < len; i++)
 		debug(" %.2x", *(u8*)(val+i));
 	debug("\n");

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2008-02-12 16:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-12  1:11 [U-Boot-Users] [PATCH 2/3] fdt: Fixup compile error and add a new OF manipulation option Bryan O'Donoghue
2008-02-12 13:27 ` Jerry Van Baren
2008-02-12 14:16   ` Bryan O'Donoghue
2008-02-12 14:58     ` Jerry Van Baren
2008-02-12 15:26       ` Stefan Roese
2008-02-12 16:12       ` Bryan O'Donoghue

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.