summaryrefslogtreecommitdiff
path: root/common/board_r.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-05-19 02:08:56 (GMT)
committerSimon Glass <sjg@chromium.org>2017-06-01 13:03:06 (GMT)
commit3af86a4e23bba49b573aabeb83bb41c199686ef6 (patch)
tree07514a3549d6c911d61209e2899251e181ea66d3 /common/board_r.c
parent8b50d526ea5b1e74934cddf6f1ee830a72401b79 (diff)
downloadu-boot-fsl-qoriq-3af86a4e23bba49b573aabeb83bb41c199686ef6.tar.xz
dm: Build a live tree after relocation
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>
Diffstat (limited to 'common/board_r.c')
-rw-r--r--common/board_r.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/common/board_r.c b/common/board_r.c
index fe7a70b..00ba319 100644
--- a/common/board_r.c
+++ b/common/board_r.c
@@ -40,6 +40,7 @@
#endif
#include <mmc.h>
#include <nand.h>
+#include <of_live.h>
#include <onenand_uboot.h>
#include <scsi.h>
#include <serial.h>
@@ -292,6 +293,14 @@ static int initr_noncached(void)
}
#endif
+#ifdef CONFIG_OF_LIVE
+static int initr_of_live(void)
+{
+ return of_live_build(gd->fdt_blob,
+ (struct device_node **)&gd->of_root);
+}
+#endif
+
#ifdef CONFIG_DM
static int initr_dm(void)
{
@@ -722,6 +731,9 @@ static init_fnc_t init_sequence_r[] = {
initr_noncached,
#endif
bootstage_relocate,
+#ifdef CONFIG_OF_LIVE
+ initr_of_live,
+#endif
#ifdef CONFIG_DM
initr_dm,
#endif