Hi Masahiro, On 6 September 2016 at 06:24, Masahiro Yamada <yamada.masah...@socionext.com> wrote: > > 2016-09-06 10:04 GMT+09:00 Simon Glass <s...@chromium.org>: > > On 30 August 2016 at 03:56, Stefan Roese <s...@denx.de> wrote: > >> On 30.08.2016 11:50, Masahiro Yamada wrote: > >>> > >>> If both SPL_DM and SPL_OF_CONTROL are enabled, SPL needs to bind > >>> several devices, but CONFIG_SYS_MALLOC_F_LEN=0x400 is apparently > >>> not enough. Increase the default to 0x2000 for the case. This > >>> will be helpful for shorter defconfigs. > >>> > >>> Signed-off-by: Masahiro Yamada <yamada.masah...@socionext.com> > >> > >> > >> Reviewed-by: Stefan Roese <s...@denx.de> > > > > Reviewed-by: Simon Glass <s...@chromium.org> > > > > It would be worth checking why. I fixed a bug where simple-bus would > > bring in all devices regardless of the u-boot,dm-pre-reloc flag. > > Perhaps that was it? > > I do not think so. > > Recently I tested this. In spite of "u-boot,dm-pre-reloc" > in the SPL device tree, my board failed in SPL. > > I guess CONFIG_SYS_MALLOC_F_LEN=0x400 is not enough > for binding/probing UART, pinctrl, MMC in SPL. > > I increased the malloc size and it worked fine.
You could turn on DEBUG in common/spl/spl.c and it will print out how much memory is used. But by making it the default you are affecting a lot of boards which don't use pinctrl, etc. 8KB is a lot for some boards. On the other hand we should make sure that it gives a sensible error when running out of memory, perhaps something like this: http://patchwork.ozlabs.org/patch/561551/ Regards, Simon _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot