]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
sandbox: fdt: add support for CONFIG_OF_CONTROL
authorSimon Glass <sjg@chromium.org>
Wed, 15 Feb 2012 23:51:11 +0000 (15:51 -0800)
committerMike Frysinger <vapier@gentoo.org>
Mon, 12 Mar 2012 15:03:42 +0000 (11:03 -0400)
This adds support for a controlling fdt, mirroring the ARM implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
arch/sandbox/include/asm/global_data.h
arch/sandbox/lib/board.c

index 8d47191f9250a3f504460160e19eb5e0570604d0..01a706362e6a53df8d39c06d6c6b3cfae2c8eaa4 100644 (file)
@@ -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;
index b7997e9a73ee63cc92d825fe0c200a4d3bf47fcf..6d464d6ae8d025f083af46fd523a9e9b9fb7d4b5 100644 (file)
@@ -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();