Hi Heiko, On 16 February 2017 at 17:36, Heiko Stübner <he...@sntech.de> wrote: > > Hi Simon, > > Am Montag, 6. Februar 2017, 07:34:54 CET schrieb Simon Glass: > > On 3 February 2017 at 08:09, Heiko Stuebner <he...@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 <he...@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 <s...@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. > ^^ u-boot,dm-spl and u-boot,dm-tpl I guess > > Dropping u-boot,dm-pre-reloc is for you to decide, as you wrote the original > implementation ;-) . It will save one fdt-query but might need several > iterations as I guess new boards will add new ones after we remove the old > ones.
Let's do it. It is more efficient and I don't expect it to cause many problems if we get it in at the start of the merge window. > > > - Can you use #ifdef in SPL/TPL to reduce code size fractionally in > > dm_fdt_pre_reloc()? > > Do you mean moving the > + dm_spl = fdt_getprop(blob, offset, "u-boot,dm-spl", NULL); > + dm_tpl = fdt_getprop(blob, offset, "u-boot,dm-tpl", NULL); > > into the existing #ifdef CONFIG_TPL_BUILD / SPL_BUILD blocks or something > else? Well I don't think it matters, but the idea is that there would then be no point in checking u-boot,dm-tpl except when CONFIG_TPL_BUILD is defined. Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot