Call pci_probe after pci bridge setup and before pci device setup.
This will allow the pci device setup to use 'struct pci_device'.
void
pci_setup(void)
{
- if (CONFIG_COREBOOT || usingXen())
- // Already done by coreboot or Xen.
+ if (CONFIG_COREBOOT || usingXen()) {
+ // PCI setup already done by coreboot or Xen - just do probe.
+ pci_probe();
return;
+ }
dprintf(3, "pci setup\n");
pci_bios_init_bus();
+ pci_probe();
+
int bdf, max;
foreachbdf(bdf, max) {
pci_init_device(pci_isa_bridge_tbl, bdf, NULL);
// Initialize pci
pci_setup();
- pci_probe();
smm_init();
// Initialize internal tables