From: Gabe Black Date: Thu, 25 Oct 2012 16:31:08 +0000 (+0000) Subject: fdt: Tell the FDT library where the device tree is X-Git-Tag: v2013.01-rc2~118^2^2~4 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3b73459ea3421e9f8c6c8c62e1d3fe458ca5bc56;p=oweals%2Fu-boot.git 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 Signed-off-by: Simon Glass --- diff --git a/common/main.c b/common/main.c index 48bed95386..fd70928a72 100644 --- a/common/main.c +++ b/common/main.c @@ -45,6 +45,10 @@ #include #endif +#ifdef CONFIG_OF_LIBFDT +#include +#endif /* CONFIG_OF_LIBFDT */ + #include #include #include @@ -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 */