summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f5437ad)
raw | patch | inline | side by side (parent: f5437ad)
author | Simon Glass <sjg@chromium.org> | |
Mon, 24 Oct 2011 19:15:34 +0000 (19:15 +0000) | ||
committer | Wolfgang Denk <wd@denx.de> | |
Wed, 26 Oct 2011 19:40:16 +0000 (21:40 +0200) |
This adds support for a new environment variable called 'fdtcontroladdr'. If
defined, the hex address is used as the address of the control fdt for U-Boot.
Note: I have not changed CONFIG_PRAM section as I already have an
outstanding patch on that.
Signed-off-by: Simon Glass <sjg@chromium.org>
defined, the hex address is used as the address of the control fdt for U-Boot.
Note: I have not changed CONFIG_PRAM section as I already have an
outstanding patch on that.
Signed-off-by: Simon Glass <sjg@chromium.org>
README | patch | blob | history | |
arch/arm/lib/board.c | patch | blob | history | |
doc/README.fdt-control | patch | blob | history |
index 558f0111ffcaf5672c66e5c846e9c815486c8dd7..a3b62e14dbb0827d0de52ba7ed7f4b73038e22c3 100644 (file)
--- a/README
+++ b/README
add the information it needs into it, and the memory
must be accessible by the kernel.
+ fdtcontroladdr- if set this is the address of the control flattened
+ device tree used by U-Boot when CONFIG_OF_CONTROL is
+ defined.
+
i2cfast - (PPC405GP|PPC405EP only)
if set to 'y' configures Linux I2C driver for fast
mode (400kHZ). This environment variable is used in
diff --git a/arch/arm/lib/board.c b/arch/arm/lib/board.c
index bd6d4e319ada5d45b6cb87f8b9a8786fa4f1d081..bae2892373e8d81f398c12adb2198a98b4a6630e 100644 (file)
--- a/arch/arm/lib/board.c
+++ b/arch/arm/lib/board.c
/* FDT is at end of image */
gd->fdt_blob = (void *)(_end_ofs + _TEXT_BASE);
#endif
+ /* Allow the early environment to override the fdt address */
+ gd->fdt_blob = (void *)getenv_ulong("fdtcontroladdr", 16,
+ (uintptr_t)gd->fdt_blob);
for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) {
if ((*init_fnc_ptr)() != 0) {
diff --git a/doc/README.fdt-control b/doc/README.fdt-control
index 3f8bb5a670175088c0147e7d6d57cefc36c1a32d..85bda035043497d8d23aed8a436e24d630c60937 100644 (file)
--- a/doc/README.fdt-control
+++ b/doc/README.fdt-control
You cannot use both of these options at the same time.
+If you wish to put the fdt at a different address in memory, you can
+define the "fdtcontroladdr" environment variable. This is the hex
+address of the fdt binary blob, and will override either of the options.
+Be aware that this environment variable is checked prior to relocation,
+when only the compiled-in environment is available. Therefore it is not
+possible to define this variable in the saved SPI/NAND flash
+environment, for example (it will be ignored).
+
+To use this, put something like this in your board header file:
+
+#define CONFIG_EXTRA_ENV_SETTINGS "fdtcontroladdr=10000\0"
+
Limitations
-----------