From: Simon Glass Date: Fri, 19 May 2017 02:08:56 +0000 (-0600) Subject: dm: Build a live tree after relocation X-Git-Tag: v2017.07-rc1~162 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3af86a4e23bba49b573aabeb83bb41c199686ef6;p=u-boot 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 --- diff --git a/common/board_r.c b/common/board_r.c index fe7a70b589..00ba319ca7 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -40,6 +40,7 @@ #endif #include #include +#include #include #include #include @@ -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