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/cpu/coreboot/tables.c | |
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/cpu/coreboot/tables.c')
-rw-r--r-- | arch/x86/cpu/coreboot/tables.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/cpu/coreboot/tables.c b/arch/x86/cpu/coreboot/tables.c index e693f4457db..2cb4a426ab6 100644 --- a/arch/x86/cpu/coreboot/tables.c +++ b/arch/x86/cpu/coreboot/tables.c @@ -28,6 +28,7 @@ * SUCH DAMAGE. */ +#include <common.h> #include <asm/ic/coreboot/ipchecksum.h> #include <asm/ic/coreboot/sysinfo.h> #include <asm/ic/coreboot/tables.h> @@ -116,6 +117,11 @@ static void cb_parse_gpios(unsigned char *ptr, struct sysinfo_t *info) info->gpios[i] = gpios->gpios[i]; } +static void cb_parse_fdt(unsigned char *ptr, struct sysinfo_t *info) +{ + info->sys_fdt = (struct fdt_header *)(((struct cb_fdt *)ptr) + 1); +} + static void cb_parse_framebuffer(unsigned char *ptr, struct sysinfo_t *info) { info->framebuffer = (struct cb_framebuffer *)ptr; @@ -216,6 +222,10 @@ static int cb_parse_header(void *addr, int len, struct sysinfo_t *info) break; case CB_TAG_GPIO: cb_parse_gpios(ptr, info); + break; + case CB_TAG_FDT: + cb_parse_fdt(ptr, info); + break; } ptr += rec->size; |