From c7de829c796978e519984df2f1c8cfcf921a39a4 Mon Sep 17 00:00:00 2001 From: wdenk Date: Tue, 19 Nov 2002 11:04:11 +0000 Subject: * Patch by Thomas Frieden, 13 Nov 2002: Add code for AmigaOne board (preliminary merge to U-Boot, still WIP) * Patch by Jon Diekema, 12 Nov 2002: - Adding URL for IEEE OUI lookup - Making the autoboot #defines dependent on CONFIG_AUTOBOOT_KEYED being defined. - In the CONFIG_EXTRA_ENV_SETTINGS #define, the root-on-initrd and root-on-nfs macros are designed to switch how the default boot method gets defined. --- drivers/pci.c | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'drivers/pci.c') diff --git a/drivers/pci.c b/drivers/pci.c index 52584ce..dc58abf 100644 --- a/drivers/pci.c +++ b/drivers/pci.c @@ -421,8 +421,11 @@ void pci_cfgfunc_do_nothing(struct pci_controller *hose, * */ +/* HJF: Changed this to return int. I think this is required + * to get the correct result when scanning bridges + */ +extern int pciauto_config_device(struct pci_controller *hose, pci_dev_t dev); extern void pciauto_config_init(struct pci_controller *hose); -extern void pciauto_config_device(struct pci_controller *hose, pci_dev_t dev); int pci_hose_scan_bus(struct pci_controller *hose, int bus) { @@ -451,8 +454,7 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus) pci_hose_read_config_word(hose, dev, PCI_VENDOR_ID, &vendor); - if (vendor != 0xffff && vendor != 0x0000) - { + if (vendor != 0xffff && vendor != 0x0000) { if (!PCI_FUNC(dev)) found_multi = header_type & 0x80; @@ -465,12 +467,15 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus) cfg = pci_find_config(hose, class, vendor, device, PCI_BUS(dev), PCI_DEV(dev), PCI_FUNC(dev)); - if (cfg) + if (cfg) { cfg->config_device(hose, dev, cfg); #ifdef CONFIG_PCI_PNP - else - pciauto_config_device(hose, dev); + } else { + int n = pciauto_config_device(hose, dev); + + sub_bus = max(sub_bus, n); #endif + } if (hose->fixup_irq) hose->fixup_irq(hose, dev); -- cgit v1.1