summaryrefslogtreecommitdiff
path: root/drivers/pci.c
diff options
context:
space:
mode:
authorstroese <stroese>2003-02-14 11:21:23 +0000
committerstroese <stroese>2003-02-14 11:21:23 +0000
commitad10dd9aaf573fefe1cbd9d446a24f07f8b87428 (patch)
treeed9676dd2921f05a3faf4ed97c416ac204e29c0d /drivers/pci.c
parente5ad56b13bc0d9e67f58c6021d0663a14cafce31 (diff)
downloadu-boot-imx-ad10dd9aaf573fefe1cbd9d446a24f07f8b87428.zip
u-boot-imx-ad10dd9aaf573fefe1cbd9d446a24f07f8b87428.tar.gz
u-boot-imx-ad10dd9aaf573fefe1cbd9d446a24f07f8b87428.tar.bz2
Add "pcidelay" environment variable (in ms, enabled via CONFIG_PCI_BOOTDELAY).
Diffstat (limited to 'drivers/pci.c')
-rw-r--r--drivers/pci.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/pci.c b/drivers/pci.c
index dc58abf..9eaaa15 100644
--- a/drivers/pci.c
+++ b/drivers/pci.c
@@ -505,4 +505,23 @@ int pci_hose_scan(struct pci_controller *hose)
return pci_hose_scan_bus(hose, hose->first_busno);
}
+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 */
+
+ /* now call board specific pci_init()... */
+ pci_init_board();
+}
+
#endif /* CONFIG_PCI */