On 03/06/17 14:09, BALATON Zoltan wrote:
The only reason is that I don't know how to do that. All I know is to make USB work correctly we need to add a device-tree node for the /pci@f0000000 bus (which can be empty but has to exist at least minimally) and this has to come before the existing /pci@f2000000 (so adding it by patching the device tree does not work unless we can put this node at the beginning which I could not figure out how to do in Forth). How this node is added is not important and I also don't know if the incorrect bus number causes any problem other than some warnings.
Where is the host bridge structure that you refer to above and should be turned into an array? I think at least ob_pci_init needs to be changed but I have no idea how so I'd need some more guidance.
It's the pci_arch_t structure used for each architecture as defined in include/drivers/pci.h. What you need to do is split out the PCI-specific fields and alter the struct to hold an array of these fields, and then update ob_pci_init() to optionally initialise more than one PCI host bridge.
ATB,
Mark.