From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Wed, 10 May 2017 08:20:45 -0600 Subject: [U-Boot] [PATCH v2 06/71] dm: Build a live tree after relocation In-Reply-To: <20170510142150.30515-1-sjg@chromium.org> References: <20170510142150.30515-1-sjg@chromium.org> Message-ID: <20170510142150.30515-7-sjg@chromium.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de If enabled, build a live device tree after relocation. This can then be used by driver model. Signed-off-by: Simon Glass --- Changes in v2: None common/board_r.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/common/board_r.c b/common/board_r.c index d69a33c4a3..47bf00dde7 100644 --- a/common/board_r.c +++ b/common/board_r.c @@ -42,6 +42,7 @@ #endif #include #include +#include #include #include #include @@ -294,6 +295,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) { @@ -741,6 +750,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 -- 2.13.0.rc2.291.g57267f2277-goog