All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] SPL Platdata howto?
Date: Thu, 20 Dec 2018 16:03:42 +0100	[thread overview]
Message-ID: <cd72f519-11fb-bfa2-6c7c-0e49b78c3d65@gmail.com> (raw)
In-Reply-To: <CAPnjgZ3XG=gtzCBuc2SsozxCdCxrE2Wz_AkAb5Pt9gLdS89Kmg@mail.gmail.com>

Am 20.12.2018 um 15:49 schrieb Simon Glass:
> Hi Simon,
> 
> On Wed, 19 Dec 2018 at 14:06, Simon Goldschmidt
> <simon.k.r.goldschmidt@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.

Yes, I should have mentioned I already read that and still had those 
questions. Kconfig help says README.platdata though. We probably should 
update that link.

> 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

I saw that as an example (because I also have an ns16550 compatible on 
my board) but couldn't figure out why it is not bound. By debugging 
'dm_scan_platdata', 'lists_bind_drivers' and 'device_bind_by_name', by 
now I know the driver names don't match. That is something I did not get 
just by reading of-plat.txt. I'll work on a patch to clarify that document.

Right now, serial works. I had to add a new platform specific driver 
just like serial_rockchip though. For DTS, we can pass multiple 
'compatible' strings, but for platdata, we have to create multiple 
drivers. That's a bit strange when porting boards...

> 
>>
>> (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.

I just wanted to start with QSPI, maybe I'll do MMC first now ;-)

Thanks for your hints!

Regards,
Simon

  reply	other threads:[~2018-12-20 15:03 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-19 21:06 [U-Boot] SPL Platdata howto? Simon Goldschmidt
2018-12-20 14:49 ` Simon Glass
2018-12-20 15:03   ` Simon Goldschmidt [this message]
2018-12-20 17:37     ` Simon Glass
2018-12-20 20:53       ` Simon Goldschmidt
2018-12-20 21:32         ` Simon Goldschmidt
2018-12-21 21:16           ` Simon Glass
2018-12-21 21:20             ` Simon Goldschmidt
2019-01-04  7:15               ` Simon Goldschmidt
2019-01-10 12:56                 ` Simon Glass
2019-01-11  7:37                   ` Simon Goldschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cd72f519-11fb-bfa2-6c7c-0e49b78c3d65@gmail.com \
    --to=simon.k.r.goldschmidt@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.