diff options
author | Wolfgang Denk <wd@denx.de> | 2007-09-08 20:52:57 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2007-09-08 20:52:57 +0200 |
commit | 87eb200ea87571f00473dc5a73fadbb5aa6dd309 (patch) | |
tree | ad48edbe0f860c7061597aa59320540881add629 /board/amcc/yucca/yucca.c | |
parent | fd63d832cd929f8e8d8fcac9b3e55b1091588a43 (diff) | |
parent | 6efc1fc0b63e55f94c5bc61d8dd23c918e3bc778 (diff) | |
download | u-boot-imx-87eb200ea87571f00473dc5a73fadbb5aa6dd309.zip u-boot-imx-87eb200ea87571f00473dc5a73fadbb5aa6dd309.tar.gz u-boot-imx-87eb200ea87571f00473dc5a73fadbb5aa6dd309.tar.bz2 |
Merge with /home/raj/git/u-boot#440SPe_PCIe_fixes
Diffstat (limited to 'board/amcc/yucca/yucca.c')
-rw-r--r-- | board/amcc/yucca/yucca.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/board/amcc/yucca/yucca.c b/board/amcc/yucca/yucca.c index d08fcf3..397b018 100644 --- a/board/amcc/yucca/yucca.c +++ b/board/amcc/yucca/yucca.c @@ -846,16 +846,18 @@ void yucca_setup_pcie_fpga_endpoint(int port) static struct pci_controller pcie_hose[3] = {{0},{0},{0}}; -void pcie_setup_hoses(void) +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 * bus ID 0 and therefore start numbering PCIe's from 1. */ - bus = 1; + bus = busno; for (i = 0; i <= 2; i++) { /* Check for yucca card presence */ if (!yucca_pcie_card_present(i)) @@ -874,8 +876,8 @@ void pcie_setup_hoses(void) hose = &pcie_hose[i]; hose->first_busno = bus; - hose->last_busno = bus; - bus++; + hose->last_busno = bus; + hose->current_busno = bus; /* setup mem resource */ pci_set_region(hose->regions + 0, @@ -895,10 +897,21 @@ void pcie_setup_hoses(void) */ #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 */ hose->last_busno = pci_hose_scan(hose); + bus = hose->last_busno + 1; #endif } } |