[PATCH v2 14/33] dtoc: Support tracking the phase of U-Boot

Simon Glass sjg at chromium.org
Sun Feb 7 01:17:14 CET 2021


U-Boot operates in several phases, typically TPL, SPL and U-Boot proper.
The latter does not use dtoc.

In some rare cases different drivers are used for two phases. For example,
in TPL it may not be necessary to use the full PCI subsystem, so a simple
driver can be used instead.

This works in the build system simply by compiling in one driver or the
other (e.g. PCI driver + uclass for SPL; simple_bus for TPL). But dtoc has
no way of knowing which code is compiled in for which phase, since it does
not inspect Makefiles or dependency graphs.

So to make this work for dtoc, we need to be able to explicitly mark
drivers with their phase. This is done by adding an empty macro to the
driver. Add support for this in dtoc.

Signed-off-by: Simon Glass <sjg at chromium.org>
---

(no changes since v1)

 include/dm/device.h         | 16 ++++++++++++++++
 tools/dtoc/dtb_platdata.py  |  7 +++++--
 tools/dtoc/main.py          |  5 ++++-
 tools/dtoc/src_scan.py      | 12 +++++++++++-
 tools/dtoc/test_dtoc.py     | 16 ++++++++--------
 tools/dtoc/test_src_scan.py |  3 +++
 6 files changed, 47 insertions(+), 12 deletions(-)

Applied to u-boot-dm, thanks!


More information about the U-Boot mailing list