From: Heiko Schocher Date: Mon, 10 Dec 2018 07:20:36 +0100 Subject: [U-Boot] [RESEND PATCH v3 16/19] lib: fdtdec: Add function re-setup the fdt more effeciently In-Reply-To: <1544190655-4405-17-git-send-email-jjhiblot@ti.com> References: <1544190655-4405-1-git-send-email-jjhiblot@ti.com> <1544190655-4405-17-git-send-email-jjhiblot@ti.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Jean-Jacques, Am 07.12.2018 um 14:50 schrieb Jean-Jacques Hiblot: > 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 > > --- > > Changes in v3: > - fdtdec_resetup() need not call fdtdec_setup() when only a single DTB is > used. > - Add documentation in README-fdt-control explaining why and how to use > fdtdec_resetup() > > Changes in v2: None > > doc/README.fdt-control | 18 ++++++++++++++++ > include/asm-generic/global_data.h | 4 ++++ > include/fdtdec.h | 21 +++++++++++++++++++ > lib/fdtdec.c | 43 ++++++++++++++++++++++++++++++++++++++- > 4 files changed, 85 insertions(+), 1 deletion(-) Thanks for resending! Reviewed-by: Heiko Schocher bye, Heiko Schocher -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de