From 6494d708bfc630ac0585d5a81707442ebf578eac Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 26 Feb 2014 15:59:18 -0700 Subject: dm: Add base driver model support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add driver model functionality for generic board. This includes data structures and base code for registering devices and uclasses (groups of devices with the same purpose, e.g. all I2C ports will be in the same uclass). The feature is enabled with CONFIG_DM. Signed-off-by: Simon Glass Signed-off-by: Marek Vasut Signed-off-by: Pavel Herrmann Signed-off-by: Viktor Křivák Signed-off-by: Tomas Hlavacek --- include/asm-generic/global_data.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/asm-generic') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index 0de0beaa8b..707400e847 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -21,6 +21,8 @@ */ #ifndef __ASSEMBLY__ +#include + typedef struct global_data { bd_t *bd; unsigned long flags; @@ -61,6 +63,12 @@ typedef struct global_data { unsigned long start_addr_sp; /* start_addr_stackpointer */ unsigned long reloc_off; struct global_data *new_gd; /* relocated global data */ + +#ifdef CONFIG_DM + struct device *dm_root; /* Root instance for Driver Model */ + struct list_head uclass_root; /* Head of core tree */ +#endif + const void *fdt_blob; /* Our device tree, NULL if none */ void *new_fdt; /* Relocated FDT */ unsigned long fdt_size; /* Space reserved for relocated FDT */ -- cgit v1.2.1