]> git.baikalelectronics.ru Git - uboot.git/commit
lib: fdtdec: Add function re-setup the fdt more effeciently
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Fri, 7 Dec 2018 13:50:52 +0000 (14:50 +0100)
committerHeiko Schocher <hs@denx.de>
Mon, 10 Dec 2018 06:21:21 +0000 (07:21 +0100)
commit236e8eea3434b56d598c31b9a0a4e0bbb1e320ca
tree94c06154f238caf9b027ee3a6d15063c8e76b144
parentc742c9f97294e13ab7ba73f795746e9695952a31
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 <jjhiblot@ti.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
doc/README.fdt-control
include/asm-generic/global_data.h
include/fdtdec.h
lib/fdtdec.c