From f1d2bc9034053e7d8ad0e77b9a0399f451bb5b80 Mon Sep 17 00:00:00 2001 From: Jean-Jacques Hiblot Date: Fri, 7 Dec 2018 14:50:52 +0100 Subject: lib: fdtdec: Add function re-setup the fdt more effeciently In some cases it may be useful to be able to change the fdt we have been using and use another one instead. For example, the TI platforms uses an EEPROM to store board information and, based on the type of board, different dtbs are used by the SPL. When DM_I2C is used, a first dtb must be used before the I2C is initialized and only then the final dtb can be selected. To speed up the process and reduce memory usage, introduce a new function fdtdec_setup_best_match() that re-use the DTBs loaded in memory by fdtdec_setup() to select the best match. Signed-off-by: Jean-Jacques Hiblot Reviewed-by: Heiko Schocher --- include/asm-generic/global_data.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include/asm-generic') diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h index dffd6b26026..78dcf40bff4 100644 --- a/include/asm-generic/global_data.h +++ b/include/asm-generic/global_data.h @@ -77,6 +77,10 @@ typedef struct global_data { #ifdef CONFIG_OF_LIVE struct device_node *of_root; #endif + +#if CONFIG_IS_ENABLED(MULTI_DTB_FIT) + const void *multi_dtb_fit; /* uncompressed multi-dtb FIT image */ +#endif struct jt_funcs *jt; /* jump table */ char env_buf[32]; /* buffer for env_get() before reloc. */ #ifdef CONFIG_TRACE -- cgit v1.3.1