[U-Boot] SPL Platdata howto?

Simon Glass sjg at chromium.org
Thu Dec 20 14:49:49 UTC 2018


Hi Simon,

On Wed, 19 Dec 2018 at 14:06, Simon Goldschmidt
<simon.k.r.goldschmidt at gmail.com> wrote:
>
> Hi,
>
> while searching for bytes to save in SPL in order to add FIT signature
> handling, I am currently trying to get socfpga-gen5 to use OF_PLATDATA.
>
> To begin, I stripped down socfpga_socrates_defconfig to absolutely
> nothing but serial drivers in SPL (with some modifications to the
> Kconfig) and enabled DEBUG_UART to see what's going on.
>
> Now while this config runs OK with a dtb (it just won't boot as drivers
> are missing -> "failed to boot from all boot devices"), it does not find
> the serial driver after enabling OF_PLATDATA.
>
> So since serial_rockchip.c already uses OF_PLATDATA and is based on
> ns16550 that my socfpga-gen5 platform is using: what do I have to do
> besides enabling OF_PLATDATA to get this working?
>
> I just seems like uclass_first_device does not find any UCLASS_SERIAL
> deivce when OF_PLATDATA is enabled.

There is the of-plat.txt README.

Basically the dtoc tool creates U_BOOT_DEVICE() declarations and links
them with SPL. These should show up in your image and therefore be
bound. You can call dm_dump_all() in SPL to see what what devices are
bound. I presume you are calling spl_init()?

You can look at what dtoc produces. The example serial driver for
Rockchip is serial_rockchip.c

>
> (And when answering this, keep in mind I need to get MMC and QSPI
> drivers working with OF_PLATDATA - I already fixed compiler errors in
> those, nothing more.)

Yes MMC should be OK, but QSPI might be blazing a bit of a trail.

Regards,
Simon


More information about the U-Boot mailing list