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

Simon Glass sjg at chromium.org
Mon Feb 6 15:34:54 UTC 2017


On 3 February 2017 at 08:09, Heiko Stuebner <heiko at 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 at 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 at 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


More information about the U-Boot mailing list