Commit f7b2af0a authored by Simon Glass's avatar Simon Glass Committed by Mike Frysinger
Browse files

sandbox: fdt: add support for CONFIG_OF_CONTROL



This adds support for a controlling fdt, mirroring the ARM implementation.
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
parent e2dcefcb
......@@ -45,6 +45,7 @@ typedef struct global_data {
unsigned long fb_base; /* base address of frame buffer */
u8 *ram_buf; /* emulated RAM buffer */
phys_size_t ram_size; /* RAM size */
const void *fdt_blob; /* Our device tree, NULL if none */
void **jt; /* jump table */
char env_buf[32]; /* buffer for getenv() before reloc. */
} gd_t;
......
......@@ -156,6 +156,14 @@ void board_init_f(ulong bootflag)
memset((void *)gd, 0, sizeof(gd_t));
#if defined(CONFIG_OF_EMBED)
/* Get a pointer to the FDT */
gd->fdt_blob = _binary_dt_dtb_start;
#elif defined(CONFIG_OF_SEPARATE)
/* FDT is at end of image */
gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE);
#endif
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
if ((*init_fnc_ptr)() != 0)
hang();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment