diff options
author | Che-Liang Chiou <clchiou@chromium.org> | 2011-07-02 03:03:43 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:58:45 -0700 |
commit | 911729f73a1ad5183a411e52279066979207734c (patch) | |
tree | ae3401ef16430e59b38b6cf1bced9fc3b944669a /include/fdt_support.h | |
parent | 12f3d7fc17ee799dee85e37669de6a53abb10f88 (diff) |
fdt: update fdt before passing it to kernel
A new flag CONFIG_OF_UPDATE_FDT_BEFORE_BOOT is added to control whether
the device tree is updated before passing it to kernel.
The (partial) calling sequence is:
do_bootm()
|
+--> bootm_linux_fdt()
|
+--> fit_update_fdt_before_boot()
|
+--> boot_relocate_fdt()
|
+--> fdt_chosen()
The fit_update_fdt_before_boot() is called before boot_relocate_fdt()
because the device tree could be enlarged after updating, and so it has
to be called earlier than relocation (otherwise it might not boot).
BUG=chromium-os:15744
TEST=make
Change-Id: Id2abe13e177ac1561f5c5e035acc5e115dba5640
Reviewed-on: http://gerrit.chromium.org/gerrit/3625
Reviewed-by: Che-Liang Chiou <clchiou@chromium.org>
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Diffstat (limited to 'include/fdt_support.h')
-rw-r--r-- | include/fdt_support.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/fdt_support.h b/include/fdt_support.h index ce6817b6d3..dc762e21eb 100644 --- a/include/fdt_support.h +++ b/include/fdt_support.h @@ -90,5 +90,9 @@ int fdt_node_offset_by_compat_reg(void *blob, const char *compat, int fdt_alloc_phandle(void *blob); int fdt_add_edid(void *blob, const char *compat, unsigned char *buf); +#if defined(CONFIG_OF_UPDATE_FDT_BEFORE_BOOT) && !defined(CONFIG_OF_NO_KERNEL) +int fit_update_fdt_before_boot(char *fdt, ulong *new_size); +# endif + #endif /* ifdef CONFIG_OF_LIBFDT */ #endif /* ifndef __FDT_SUPPORT_H */ |