Merge git://www.denx.de/git/u-boot
[oweals/u-boot.git] / board / amcc / katmai / katmai.c
index a9ae4a373923b41caf4eaf83916f94004679f6b4..afd60ece6247fda08de2000829ce81255926c2f4 100644 (file)
@@ -396,6 +396,8 @@ void pcie_setup_hoses(int busno)
 {
        struct pci_controller *hose;
        int i, bus;
+       char *env;
+       unsigned int delay;
 
        /*
         * assume we're called after the PCIX hose is initialized, which takes
@@ -439,6 +441,16 @@ void pcie_setup_hoses(int busno)
                 */
 #else
                ppc440spe_setup_pcie_rootpoint(hose, i);
+
+               env = getenv ("pciscandelay");
+               if (env != NULL) {
+                       delay = simple_strtoul (env, NULL, 10);
+                       if (delay > 5)
+                               printf ("Warning, expect noticable delay before PCIe"
+                                       "scan due to 'pciscandelay' value!\n");
+                       mdelay (delay * 1000);
+               }
+
                /*
                 * Config access can only go down stream
                 */