diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2011-08-09 09:43:40 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:59:32 -0700 |
commit | b5330c3bc3e2d2240a1d79c6b084d3de0e199d95 (patch) | |
tree | 620bf00129f4ee3cc8759941de2280389ee57329 /arch/x86/include | |
parent | f8dbba10ee02dd18c09d52f94c945e3201a4805b (diff) |
Enable OF_CONTROL for Alex.
This change makes the Alex u-boot use configuration settings
coming from the device tree supplied by coreboot through the
coreboot table.
The device tree now includes the necessary console configuration
information.
Code is added to retrieve the device tree pointer from the
coreboot table, the appropriate coreboot structures and tag
values are being duplicated in
arch/i386/include/asm/ic/coreboot/tables.h. The pointer to the
FDT is added to the global data structure, it is initialized as
soon as it is retrieved from the coreboot table.
For some reason placing the global data structure anywhere but in
the .data segment causes the system to crash. This phenomenon
will be investigated shortly, this commit is an intermediate step
to get the device tree handover used by other coreboot/u-boot
contributors.
Core retrieving the device tree from CBFS is not needed anymore
and gets removed.
BUG=chrome-os-partner:5248
TEST=manual
. build the new image and program it on Alex
. restart the target, observe the console output
The target boots all the way to u-boot prompt.
Change-Id: I087cf70362ede0873be37fa5a98aa66a0b979d8f
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/6132
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Diffstat (limited to 'arch/x86/include')
-rw-r--r-- | arch/x86/include/asm/ic/coreboot/sysinfo.h | 6 | ||||
-rw-r--r-- | arch/x86/include/asm/ic/coreboot/tables.h | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/include/asm/ic/coreboot/sysinfo.h b/arch/x86/include/asm/ic/coreboot/sysinfo.h index 86caaa339de..e02735346bd 100644 --- a/arch/x86/include/asm/ic/coreboot/sysinfo.h +++ b/arch/x86/include/asm/ic/coreboot/sysinfo.h @@ -32,6 +32,9 @@ #include <compiler.h> #include <asm/ic/coreboot/tables.h> +#ifdef CONFIG_OF_CONTROL +#include <fdt.h> +#endif /* Allow a maximum of 16 memory range definitions. */ #define SYSINFO_MAX_MEM_RANGES 16 @@ -75,6 +78,9 @@ struct sysinfo_t { struct cb_gpio gpios[SYSINFO_MAX_GPIOS]; unsigned long *mbtable; /** Pointer to the multiboot table */ +#ifdef CONFIG_OF_CONTROL + struct fdt_header *sys_fdt; +#endif }; extern struct sysinfo_t lib_sysinfo; diff --git a/arch/x86/include/asm/ic/coreboot/tables.h b/arch/x86/include/asm/ic/coreboot/tables.h index e9a0c7ba968..b581e7285f3 100644 --- a/arch/x86/include/asm/ic/coreboot/tables.h +++ b/arch/x86/include/asm/ic/coreboot/tables.h @@ -181,6 +181,13 @@ struct cb_gpios { struct cb_gpio gpios[0]; }; +#define CB_TAG_FDT 0x0014 +struct cb_fdt { + uint32_t tag; + uint32_t size; /* size of the entire entry */ + /* the actual FDT gets placed here */ +}; + #define CB_TAG_CMOS_OPTION_TABLE 0x00c8 struct cb_cmos_option_table { u32 tag; |