From: Volodymyr Babchuk <[email protected]> RP1 chip is the PCIe device which should provide transparent access to the peripheral connected to it for the main Soc. Current RP1 device tree node structure and RP1 driver implementation don't allow PCIe subsystem to make a proper initialization of RP1 device with child nodes. So RP1 probe should be called after all initializations were done.
Signed-off-by: Volodymyr Babchuk <[email protected]> Signed-off-by: Oleksii Moisieiev <[email protected]> Reviewed-by: Volodymyr Babchuk <[email protected]> --- board/raspberrypi/rpi/rpi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index 32d67eb7f4..c45b1e277d 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -593,3 +593,26 @@ int ft_board_setup(void *blob, struct bd_info *bd) return 0; } + +/* TODO: Using late_init to initialize pci device with ID_RP1. + * RP1 pci device should be initialized by the PCI subsystem because + * it is under develop right now and depends from the final device-tree + * format from the Linux Kernel. Current device-tree format violates + * pci driver model. So this should be changed after upstreaming RP1 + * to the Linux Kernel source code. + * This initialization should be done only for RPI5 board. + */ +#ifdef CONFIG_BCM2712 +int board_late_init(void) +{ + struct udevice *dev; + int err; + + err = dm_pci_find_device(PCI_VENDOR_ID_RPI, PCI_DEVICE_ID_RP1_C0, + 0, &dev); + if (err) + printf("RPI: RP1 device not found\n"); + + return 0; +} +#endif -- 2.34.1

