dm: sandbox: i2c_rtc: Drop fdtdec.h header
[platform/kernel/u-boot.git] / drivers / pci / pci.c
index 645ecd4..6b36c18 100644 (file)
@@ -9,7 +9,10 @@
  */
 
 /*
- * PCI routines
+ * Old PCI routines
+ *
+ * Do not change this file. Instead, convert your board to use CONFIG_DM_PCI
+ * and change pci-uclass.c.
  */
 
 #include <common.h>
@@ -172,11 +175,7 @@ pci_dev_t pci_find_devices(struct pci_device_id *ids, int index)
        int bus;
 
        for (hose = pci_get_hose_head(); hose; hose = hose->next) {
-#ifdef CONFIG_SYS_SCSI_SCAN_BUS_REVERSE
-               for (bus = hose->last_busno; bus >= hose->first_busno; bus--) {
-#else
                for (bus = hose->first_busno; bus <= hose->last_busno; bus++) {
-#endif
                        bdf = pci_hose_find_devices(hose, bus, ids, &index);
                        if (bdf != -1)
                                return bdf;
@@ -459,6 +458,10 @@ void pci_init(void)
 {
        hose_head = NULL;
 
+       /* allow env to disable pci init/enum */
+       if (getenv("pcidisable") != NULL)
+               return;
+
        /* now call board specific pci_init()... */
        pci_init_board();
 }