dtoc: Support tracking the phase of U-Boot
authorSimon Glass <sjg@chromium.org>
Wed, 3 Feb 2021 13:01:02 +0000 (06:01 -0700)
committerSimon Glass <sjg@chromium.org>
Mon, 22 Mar 2021 06:23:27 +0000 (19:23 +1300)
commitb00f0066e52413e0f8fd4a84681e6e27c4270c26
treede41f3fc135501b607ad5790b03dc27c63e32e5d
parentb9319c4f9b103b6c5b10e8592471a29bd9645caf
dtoc: Support tracking the phase of U-Boot

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@chromium.org>
include/dm/device.h
tools/dtoc/dtb_platdata.py
tools/dtoc/main.py
tools/dtoc/src_scan.py
tools/dtoc/test_dtoc.py
tools/dtoc/test_src_scan.py