All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH v2 1/8] sandbox: fdt: Add support for CONFIG_OF_CONTROL
@ 2012-01-11  0:45 Simon Glass
  2012-01-11  0:45 ` [U-Boot] [PATCH v2 2/8] sandbox: config: Enable fdt and snprintf() options Simon Glass
                   ` (7 more replies)
  0 siblings, 8 replies; 35+ messages in thread
From: Simon Glass @ 2012-01-11  0:45 UTC (permalink / raw)
  To: u-boot

This adds support for a controlling fdt, mirroring the ARM implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/sandbox/include/asm/global_data.h |    1 +
 arch/sandbox/lib/board.c               |    8 ++++++++
 2 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/arch/sandbox/include/asm/global_data.h b/arch/sandbox/include/asm/global_data.h
index 8d47191..01a7063 100644
--- a/arch/sandbox/include/asm/global_data.h
+++ b/arch/sandbox/include/asm/global_data.h
@@ -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;
diff --git a/arch/sandbox/lib/board.c b/arch/sandbox/lib/board.c
index b7997e9..c5a1177 100644
--- a/arch/sandbox/lib/board.c
+++ b/arch/sandbox/lib/board.c
@@ -156,6 +156,14 @@ void board_init_f(ulong bootflag)
 
 	memset((void *)gd, 0, sizeof(gd_t));
 
+#ifdef 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();
-- 
1.7.3.1

^ permalink raw reply related	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2012-02-21  6:12 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-11  0:45 [U-Boot] [PATCH v2 1/8] sandbox: fdt: Add support for CONFIG_OF_CONTROL Simon Glass
2012-01-11  0:45 ` [U-Boot] [PATCH v2 2/8] sandbox: config: Enable fdt and snprintf() options Simon Glass
2012-01-20 18:54   ` Mike Frysinger
2012-01-23  5:30     ` Simon Glass
2012-01-24 21:24       ` Mike Frysinger
2012-02-15  6:26         ` Simon Glass
2012-02-21  5:24           ` Mike Frysinger
2012-02-21  5:37             ` Simon Glass
2012-02-21  6:12               ` Mike Frysinger
2012-01-11  0:45 ` [U-Boot] [PATCH v2 3/8] sandbox: gpio: Add basic driver for simulating GPIOs Simon Glass
2012-01-20 18:59   ` Mike Frysinger
2012-01-23  6:20     ` Simon Glass
2012-01-24 21:35       ` Mike Frysinger
2012-01-24 23:06         ` Mike Frysinger
2012-02-15 22:34           ` Simon Glass
2012-01-11  0:45 ` [U-Boot] [PATCH v2 4/8] sandbox: Enable GPIO driver Simon Glass
2012-01-20 18:59   ` Mike Frysinger
2012-01-23  6:21     ` Simon Glass
2012-01-11  0:45 ` [U-Boot] [PATCH v2 5/8] sandbox: Add concept of sandbox state Simon Glass
2012-01-11  0:45 ` [U-Boot] [PATCH v2 6/8] sandbox: Allow processing instead of or before main loop Simon Glass
2012-01-20 19:00   ` Mike Frysinger
2012-01-23  6:25     ` Simon Glass
2012-01-11  0:45 ` [U-Boot] [PATCH v2 7/8] sandbox: Add flags for open() call Simon Glass
2012-01-15  4:19   ` Mike Frysinger
2012-01-15  4:36     ` Simon Glass
2012-01-15  4:44       ` Mike Frysinger
2012-01-15  4:48         ` Simon Glass
2012-01-11  0:45 ` [U-Boot] [PATCH v2 8/8] sandbox: Add basic command line parsing Simon Glass
2012-01-20 19:05   ` Mike Frysinger
2012-01-23  6:30     ` Simon Glass
2012-01-24 21:36       ` Mike Frysinger
2012-01-20 18:54 ` [U-Boot] [PATCH v2 1/8] sandbox: fdt: Add support for CONFIG_OF_CONTROL Mike Frysinger
2012-01-23  5:27   ` Simon Glass
2012-01-23  7:32     ` Mike Frysinger
2012-02-15  6:11       ` Simon Glass

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.