Question regarding CONFIG_SPL_OF_PLATDATA_INST usage

Lukasz Majewski lukma at denx.de
Thu Apr 27 17:23:11 CEST 2023


Hi Simon,

I'm trying to convert imx28 based XEA board to use CONFIG_DM_SERIAL.
This board uses SPL_OF_PLATDATA to have as small SPL as possible.

It looks like the 'duart' description/driver is properly instantiated,
but serial console is configured too early -> apparently
serial_find_console_or_panic() from serial_init() at serial-uclass.c is
called before DM is setup in SPL.


To fix this problem - in the commit (SHA1: 5a1b25c2011) the
CONFIG_SPL_OF_PLATDATA_INST has been introduced; without it (after
commit SHA1: 1e9ced28f18ed75bef96df08e47baad27dd51829) uclass_get()
returns -EDEADLOCK.


Grepping the sources show that only two "boards" use it:

1. arch/x86/cpu/apollolake/Kconfig -> TPL_OF_PLATDATA_INST 
   (configs/chromebook_coral_defconfig and corresponding
   ./arch/x86/dts/chromebook_coral.dts)

2. configs/sandbox_spl_defconfig   -> CONFIG_SPL_OF_PLATDATA_INST=y



I would like to ask if:

- Anybody managed to use CONFIG_SPL_OF_PLATDATA_INST=y on real HW?

- Is it on purpose, that dtoc tool is not extracting structures
  definitions from *.c files ? 

- Is the "coral" board (from point 1 above) using any extra
  coral*-u-boot.dtsi to specify which parts of dts shall be included to
  the in-TPL DTS? Or is it just using full-blown DTS support ins TPL?


I'm using cutting-edge mainline u-boot - SHA1:
6a11fdf0536e02ac9cd4a3da0535a271c694715f

Thanks in advance for any help.



Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Erika Unter
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma at denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20230427/1a00d3cf/attachment.sig>


More information about the U-Boot mailing list