summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/pci/pci.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 1a0b14c..5f1f128 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -695,6 +695,23 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
int pci_hose_scan(struct pci_controller *hose)
{
+#if defined(CONFIG_PCI_BOOTDELAY)
+ static int pcidelay_done;
+ char *s;
+ int i;
+
+ if (!pcidelay_done) {
+ /* wait "pcidelay" ms (if defined)... */
+ s = getenv("pcidelay");
+ if (s) {
+ int val = simple_strtoul(s, NULL, 10);
+ for (i = 0; i < val; i++)
+ udelay(1000);
+ }
+ pcidelay_done = 1;
+ }
+#endif /* CONFIG_PCI_BOOTDELAY */
+
/* Start scan at current_busno.
* PCIe will start scan at first_busno+1.
*/
@@ -709,19 +726,6 @@ int pci_hose_scan(struct pci_controller *hose)
void pci_init(void)
{
-#if defined(CONFIG_PCI_BOOTDELAY)
- char *s;
- int i;
-
- /* wait "pcidelay" ms (if defined)... */
- s = getenv ("pcidelay");
- if (s) {
- int val = simple_strtoul (s, NULL, 10);
- for (i=0; i<val; i++)
- udelay (1000);
- }
-#endif /* CONFIG_PCI_BOOTDELAY */
-
hose_head = NULL;
/* now call board specific pci_init()... */