[U-Boot] [PATCH v3 01/16] dm: allow limiting pre-reloc markings to spl or tpl

Simon Glass
2017-02-06T15:34:54Z

On 3 February 2017 at 08:09, Heiko Stuebner <heiko@sntech.de> wrote:
> Right now the u-boot,dm-pre-reloc flag will make each marked node
> always appear in both spl and tpl. But systems needing an additional
> tpl might have special constraints for each, like the spl needing to
> be very tiny.
>
> So introduce two additional flags to mark nodes for only spl or tpl
> environments and introduce a function dm_fdt_pre_reloc to automate
> the necessary checks in code instances checking for pre-relocation
> flags.
>
> The behaviour of the original flag stays untouched and still marks
> a node for both spl and tpl.
>
> Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> ---
> doc/driver-model/README.txt | 4 ++++
> drivers/clk/at91/pmc.c | 3 ++-
> drivers/core/root.c | 2 +-
> drivers/core/util.c | 29 +++++++++++++++++++++++++++++
> drivers/pinctrl/pinctrl-uclass.c | 3 ++-
> include/dm/util.h | 2 ++
> scripts/Makefile.spl | 7 ++++++-
> tools/dtoc/dtoc.py | 2 ++
> 8 files changed, 48 insertions(+), 4 deletions(-)

Reviewed-by: Simon Glass <sjg@chromium.org>

s/u-boot/U-Boot

Please add a comment for dm_fdt_pre_reloc() in the header file.

Two things to consider:

- Should we drop the use of u-boot,dm-pre-reloc in Makefile.spl, and
convert all users to your version? This would mean having both
u-boot,dm-pre-reloc and u-boot,dm-spl in some cases, I suspect.

- Can you use #ifdef in SPL/TPL to reduce code size fractionally in
dm_fdt_pre_reloc()?

Regards,
Simon