@@ -33,6 +33,7 @@
#if defined(CONFIG_CMD_KGDB)
#include <kgdb.h>
#endif
+#include <livetree.h>
#include <logbuff.h>
#include <malloc.h>
#include <mapmem.h>
@@ -314,6 +315,14 @@ static int initr_noncached(void)
}
#endif
+#ifdef CONFIG_OF_LIVE
+static int initr_livetree(void)
+{
+ return livetree_build(gd->fdt_blob,
+ (struct device_node **)&gd->of_root);
+}
+#endif
+
#ifdef CONFIG_DM
static int initr_dm(void)
{
@@ -781,6 +790,9 @@ init_fnc_t init_sequence_r[] = {
initr_noncached,
#endif
bootstage_relocate,
+#ifdef CONFIG_OF_LIVE
+ initr_livetree,
+#endif
#ifdef CONFIG_DM
initr_dm,
#endif
@@ -10,6 +10,8 @@
#ifndef _LIVETREE_H
#define _LIVETREE_H
+struct device_node;
+
/**
* livetree_build() - build a live (hierarchical) tree from a flat DT
*
If enabled, build a live device tree after relocation. This can then be used by driver model. Signed-off-by: Simon Glass <sjg@chromium.org> --- common/board_r.c | 12 ++++++++++++ include/livetree.h | 2 ++ 2 files changed, 14 insertions(+)