summaryrefslogtreecommitdiff
path: root/common/main.c
diff options
context:
space:
mode:
authorGabe Black <gabeblack@chromium.org>2012-10-25 16:31:08 +0000
committerGerald Van Baren <gvb@unssw.com>2012-11-12 23:14:57 -0500
commit3b73459ea3421e9f8c6c8c62e1d3fe458ca5bc56 (patch)
tree715faf0c00cd2a1ab047b5f9a73d7631f3c5f56b /common/main.c
parent224b72e639e87040a1845cf9795b45417e064bba (diff)
downloadu-boot-imx-3b73459ea3421e9f8c6c8c62e1d3fe458ca5bc56.zip
u-boot-imx-3b73459ea3421e9f8c6c8c62e1d3fe458ca5bc56.tar.gz
u-boot-imx-3b73459ea3421e9f8c6c8c62e1d3fe458ca5bc56.tar.bz2
fdt: Tell the FDT library where the device tree is
This change adds a call to set_working_fdt_addr near the end of u-boot initialization which tells the fdt command/library where the device tree is. This makes it possible to use the fdt command to look at the active device tree since otherwise there would be no way to know what address it was at to set things up manually. Signed-off-by: Gabe Black <gabeblack@google.com> Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/main.c')
-rw-r--r--common/main.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/common/main.c b/common/main.c
index 48bed95..fd70928 100644
--- a/common/main.c
+++ b/common/main.c
@@ -45,6 +45,10 @@
#include <fdtdec.h>
#endif
+#ifdef CONFIG_OF_LIBFDT
+#include <fdt_support.h>
+#endif /* CONFIG_OF_LIBFDT */
+
#include <post.h>
#include <linux/ctype.h>
#include <menu.h>
@@ -418,6 +422,10 @@ void main_loop (void)
#endif /* CONFIG_MENUKEY */
#endif /* CONFIG_BOOTDELAY */
+#if defined CONFIG_OF_CONTROL
+ set_working_fdt_addr((void *)gd->fdt_blob);
+#endif /* CONFIG_OF_CONTROL */
+
/*
* Main Loop for Monitor Command Processing
*/