[U-Boot] [PATCH v2] of-platdata: improve documentation

Simon Glass sjg at google.com
Tue Mar 19 01:25:10 UTC 2019


Hi Adam,

On Wed, 13 Feb 2019 at 05:14, Adam Ford <aford173 at gmail.com> wrote:
>
> On Mon, Jan 21, 2019 at 12:26 PM <sjg at google.com> wrote:
> >
> > On Wed, 16 Jan 2019 at 12:40, Simon Goldschmidt
> > <simon.k.r.goldschmidt at gmail.com> wrote:
> > >
> > > Improve some things in the documentation of OF_PLATDATA that I found
> > > while porting socfgpa_gen5 to it.
>
> Thanks for doing that.  I actually learned a bit.  :-)
>
> This may be more directed at Simon, but it seems like many platforms
> are limited in SPL and OF_PLATDATA might be a great feature to get
> more drivers supporting device tree booting without as much overhead.
>
> From how the documentation reads, it seems like the drivers may not
> necessarily support OF_PLATDATA by default.  I've been struggling
> trying to enable basic functions (like serial via 16550 driver)
> because the platform data generated doesn't necessarily match the
> platform data I use to start the serial device.  I would like to
> migrate from using manually entered platform data to using OF_PLATDATA
> to reduce the overhead.
>
> A few things I noticed are that the generated device names correspond
> to the names listed in the 'compatible' flag and there doesn't seem to
> be a good way to link them to the actual driver name.

Yes, that is the job of the code. See for example
rockchip_serial_probe() which copies the platform data out of the
of-platdata struct and into the normal one.

>
> I see a few drivers that check for OF_PLATDATA, but I am not seeing
> many people actually utilize this feature.  Any suggestions on how to
> one might migrate a driver (like serial) which already supports
> OF_CONTROL in u-boot, but the generated platdata doesn't boot in SPL?

You can have a look at serial_rockchip as an example. If you don't
have a JTAG unit I suggest enabling the debug UART so you can debug
what goes wrong when it cannot find the serial device.

Regards,
Simon


More information about the U-Boot mailing list