summaryrefslogtreecommitdiffstats
path: root/drivers/pci.c
diff options
context:
space:
mode:
authorwdenk <wdenk>2002-11-19 11:04:11 +0000
committerwdenk <wdenk>2002-11-19 11:04:11 +0000
commitc7de829c796978e519984df2f1c8cfcf921a39a4 (patch)
tree43e42aa9a09f5265783c1622a5cea080471ef50e /drivers/pci.c
parent2262cfeef91458b01a1bfe3812ccbbfdf8b82807 (diff)
downloadu-boot-c7de829c796978e519984df2f1c8cfcf921a39a4.tar.gz
u-boot-c7de829c796978e519984df2f1c8cfcf921a39a4.tar.xz
u-boot-c7de829c796978e519984df2f1c8cfcf921a39a4.zip
* 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.
Diffstat (limited to 'drivers/pci.c')
-rw-r--r--drivers/pci.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/pci.c b/drivers/pci.c
index 52584ce62b..dc58abfe48 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);