]> git.karo-electronics.de Git - karo-tx-uboot.git/blobdiff - drivers/pci/pci.c
pci: Honour pci_skip_dev()
[karo-tx-uboot.git] / drivers / pci / pci.c
index 60c333e2c0191d5ef8753075669a7edc3af95532..7ee21d1c1d1d039c734a64f635e0c8236569b422 100644 (file)
@@ -195,6 +195,9 @@ pci_dev_t pci_find_devices(struct pci_device_id *ids, int index)
                             bdf < PCI_BDF(bus + 1, 0, 0);
 #endif
                             bdf += PCI_BDF(0, 0, 1)) {
+                               if (pci_skip_dev(hose, bdf))
+                                       continue;
+
                                if (!PCI_FUNC(bdf)) {
                                        pci_read_config_byte(bdf,
                                                             PCI_HEADER_TYPE,
@@ -662,13 +665,15 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
 #endif
 
 #ifdef CONFIG_PCI_PNP
-               sub_bus = max(pciauto_config_device(hose, dev), sub_bus);
+               sub_bus = max((unsigned int)pciauto_config_device(hose, dev),
+                             sub_bus);
 #else
                cfg = pci_find_config(hose, class, vendor, device,
                                      PCI_BUS(dev), PCI_DEV(dev), PCI_FUNC(dev));
                if (cfg) {
                        cfg->config_device(hose, dev, cfg);
-                       sub_bus = max(sub_bus, hose->current_busno);
+                       sub_bus = max(sub_bus,
+                                     (unsigned int)hose->current_busno);
                }
 #endif