Initialization order
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Jun 24 13:18:45 PDT 2026
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 |
More information about the barebox
mailing list