[U-Boot-Users] [PATCH] Allow board code to fixup the OF flat device tree before booting a kernel

Kumar Gala galak at gate.crashing.org
Tue Dec 13 18:06:12 CET 2005


Allow board code to fixup the OF flat device tree before booting a kernel

Signed-off-by: Kumar Gala <galak at kernel.crashing.org>

CHANGELOG:
* Allow board code to fixup the OF flat device tree before booting a kernel

  Patch by Kumar Gala 13 Dec 2005

---
commit 943fd6f23661331e7ab70f9ab190387f5e0ca1ff
tree 182dedeba4351f5c4e1cfd1c12a7870fad50b76a
parent 7abb967b49b86994aca615acc60cbc322efb9b98
author Kumar Gala <galak at kernel.crashing.org> Tue, 13 Dec 2005 11:09:21 -0600
committer Kumar Gala <galak at kernel.crashing.org> Tue, 13 Dec 2005 11:09:21 -0600

 README            |    6 ++++++
 common/ft_build.c |    5 ++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/README b/README
index 21f5bf0..ea37dac 100644
--- a/README
+++ b/README
@@ -411,6 +411,7 @@ The following options need to be configu
 		The maximum size of the constructed OF tree.
 
 		OF_CPU - The proper name of the cpus node.
+		OF_SOC - The proper name of the soc node.
 		OF_TBCLK - The timebase frequency.
 
 		CONFIG_OF_HAS_BD_T
@@ -423,6 +424,11 @@ The following options need to be configu
 		The resulting flat device tree will have a copy of u-boot's
 		environment variables
 
+		CONFIG_OF_BOARD_SETUP
+
+		Board code has addition modification that it wants to make
+		to the flat device tree before handing it off to the kernel
+
 - Serial Ports:
 		CFG_PL010_SERIAL
 
diff --git a/common/ft_build.c b/common/ft_build.c
index c67af6f..bebee30 100644
--- a/common/ft_build.c
+++ b/common/ft_build.c
@@ -690,9 +690,12 @@ void ft_setup(void *blob, int size, bd_t
 	if (p != NULL)
 		*p = cpu_to_be32(clock);
 #endif
-
 #endif				/* __powerpc__ */
 
+#ifdef CONFIG_OF_BOARD_SETUP
+	ft_board_setup(blob, bd);
+#endif
+
 	/*
 	   printf("final OF-tree\n");
 	   ft_dump_blob(blob);





More information about the U-Boot mailing list