diff mbox

[U-Boot,v3,1/6] fdt: ARM: Add device tree control of U-Boot (CONFIG_OF_CONTROL)

Message ID 1318371971-4457-2-git-send-email-sjg@chromium.org
State New, archived
Headers show

Commit Message

Simon Glass Oct. 11, 2011, 10:26 p.m. UTC
This adds a device tree pointer to the global data. It can be set by
board code. A later commit will add support for embedding it in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v3:
- Rename gd->blob to gd->fdt_blob

 README                             |   11 +++++++++++
 arch/arm/include/asm/global_data.h |    1 +
 2 files changed, 12 insertions(+), 0 deletions(-)

Comments

Stephen Warren Oct. 11, 2011, 11:39 p.m. UTC | #1
Simon Glass wrote at Tuesday, October 11, 2011 4:26 PM:
> This adds a device tree pointer to the global data. It can be set by
> board code. A later commit will add support for embedding it in U-Boot.

s/it/the device-tree/?

...
> diff --git a/README b/README
...
> +- Device tree:
> +		CONFIG_OF_CONTROL
> +		If this variable is defined, U-Boot will use a device tree
> +		to configure its devices, instead of relying on statically
> +		compiled #defines in the board file. This option is
> +		experimental and only available on a few boards. The device
> +		tree is available in the global data as gd->blob.

gd->fdt_blob
diff mbox

Patch

diff --git a/README b/README
index 3a8938f..1175960 100644
--- a/README
+++ b/README
@@ -810,6 +810,17 @@  The following options need to be configured:
 
 		XXX - this list needs to get updated!
 
+- Device tree:
+		CONFIG_OF_CONTROL
+		If this variable is defined, U-Boot will use a device tree
+		to configure its devices, instead of relying on statically
+		compiled #defines in the board file. This option is
+		experimental and only available on a few boards. The device
+		tree is available in the global data as gd->blob.
+
+		U-Boot needs to get its device tree from somewhere. This will
+		be enabled in a future patch.
+
 - Watchdog:
 		CONFIG_WATCHDOG
 		If this variable is defined, it enables watchdog
diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h
index fac98d5..c3ff789 100644
--- a/arch/arm/include/asm/global_data.h
+++ b/arch/arm/include/asm/global_data.h
@@ -76,6 +76,7 @@  typedef	struct	global_data {
 #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
 	unsigned long	tlb_addr;
 #endif
+	const void	*fdt_blob;	/* Our device tree, NULL if none */
 	void		**jt;		/* jump table */
 	char		env_buf[32];	/* buffer for getenv() before reloc. */
 #if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)