From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Renaud Barbier <Renaud.Barbier@ametek.com>,
Barebox List <barebox@lists.infradead.org>
Subject: Re: Initialization order
Date: Wed, 24 Jun 2026 22:18:45 +0200 [thread overview]
Message-ID: <a1496274-e221-4dae-99ae-6ba52220cc9c@pengutronix.de> (raw)
In-Reply-To: <SJ0PR07MB976607010E638B0F6CDE5B66ECED2@SJ0PR07MB9766.namprd07.prod.outlook.com>
Hello Renaud,
On 6/24/26 17:51, Renaud Barbier wrote:
> Hello,
> I have a LS1021A connected to a device via SPI bus and PCIe bus. To enable the PCIe bus on this device , I need to write registers via the SPI bus.
> I created a small SPI driver using the regmap layer to access the chip and I am able to display or write registers via md and mw.
>
> I have tried (core)device_initcall opening the device using open_and_lseek but it is either called after ls_pcie_probe or too early and failed
>
> What would be the best approach to do this initialization before ls_pcie_probe is called?
The easy way would be doing it in the board driver by enabling deep probe and calling
of_device_ensure_probed() on the SPI device to ensure it's available.
The more proper way would be to reflect the dependency in the device tree.
Sascha did some work with creating DT nodes for PCI devices recently,
so maybe he has some advice to share.
Cheers,
Ahmad
>
>
> Cheers,
> Renaud
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2026-06-24 20:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-24 15:51 Renaud Barbier
2026-06-24 20:18 ` Ahmad Fatoum [this message]
2026-06-25 9:02 ` Renaud Barbier
2026-06-25 10:56 ` Ahmad Fatoum
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=a1496274-e221-4dae-99ae-6ba52220cc9c@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=Renaud.Barbier@ametek.com \
--cc=barebox@lists.infradead.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox