diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2011-08-04 13:00:14 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:59:23 -0700 |
commit | 57677a56be074b2ca5f0efab7cb64457659ab46e (patch) | |
tree | 4838f7bc4584a9a2424e8135acb3fc7e3861bba1 /lib | |
parent | f5a7940aff85e00f1afe1495934b2ab6a9531b05 (diff) |
Decouple x86 u-boot from fdt related functions.
The x86 u-boot does not enable the CONFIG_OF_CONTROL flag yet,
and as such should not compile in the FDT related functions. This
change takes care of this arrangement and also removes the
remaining common code using fdt unconditionally.
BUG=chrome-os-partner:4993
TEST=manual
. build u-boot for Kaen, verify that the system still comes up
as expected.
. build coreboot image for Alex, verify that the system still
can be started manually.
Change-Id: I5416f9fd0a6cc9f86aef9051b1f7b6d9b252964e
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://gerrit.chromium.org/gerrit/5362
Diffstat (limited to 'lib')
-rw-r--r-- | lib/chromeos/Makefile | 2 | ||||
-rw-r--r-- | lib/chromeos/crossystem_data.c | 11 |
2 files changed, 9 insertions, 4 deletions
diff --git a/lib/chromeos/Makefile b/lib/chromeos/Makefile index d59589c455..6fe3bdc2e8 100644 --- a/lib/chromeos/Makefile +++ b/lib/chromeos/Makefile @@ -14,7 +14,7 @@ LIB = $(obj)libchromeos.a COBJS-$(CONFIG_CHROMEOS) += boot_kernel.o COBJS-$(CONFIG_CHROMEOS) += crossystem_data.o -COBJS-$(CONFIG_CHROMEOS) += fdt_decode.o +COBJS-$(CONFIG_OF_CONTROL) += fdt_decode.o COBJS-$(CONFIG_CHROMEOS) += firmware_storage_spi.o COBJS-$(CONFIG_CHROMEOS) += fmap.o COBJS-$(CONFIG_CHROMEOS) += gbb.o diff --git a/lib/chromeos/crossystem_data.c b/lib/chromeos/crossystem_data.c index 831a38fbb3..c2fbaeeebb 100644 --- a/lib/chromeos/crossystem_data.c +++ b/lib/chromeos/crossystem_data.c @@ -9,14 +9,17 @@ */ #include <common.h> -#include <fdt_decode.h> -#include <fdt_support.h> #include <gbb_header.h> /* for GoogleBinaryBlockHeader */ -#include <libfdt.h> #include <chromeos/common.h> #include <chromeos/crossystem_data.h> #include <linux/string.h> +#ifdef CONFIG_OF_LIBFDT +#include <fdt_decode.h> +#include <fdt_support.h> +#include <libfdt.h> +#endif + #define CROSSYSTEM_DATA_SIGNATURE "CHROMEOS" /* This is used to keep bootstub and readwite main firmware in sync */ @@ -103,6 +106,7 @@ int crossystem_data_set_main_firmware(crossystem_data_t *cdata, return 0; } +#ifdef CONFIG_OF_LIBFDT int crossystem_data_embed_into_fdt(crossystem_data_t *cdata, void *fdt, uint32_t *size_ptr) { @@ -230,6 +234,7 @@ int crossystem_data_embed_into_fdt(crossystem_data_t *cdata, void *fdt, VBDEBUG(PREFIX "fail to store all properties into fdt\n"); return err; } +#endif /* ^^^^ CONFIG_OF_LIBFDT NOT defined ^^^^ */ void crossystem_data_dump(crossystem_data_t *cdata) { |