summaryrefslogtreecommitdiff
path: root/drivers/pci.c
diff options
context:
space:
mode:
authorEd Swarthout <Ed.Swarthout@freescale.com>2007-07-11 14:51:35 -0500
committerWolfgang Denk <wd@denx.de>2007-07-11 23:43:11 +0200
commit40e81addab7bb74d20ddf681ce9babc880a828ee (patch)
treec8e1a834d9f51fdca5404af99d846caa98edaaba /drivers/pci.c
parent3865b1fb7843a08ad49a6319a36415752276ff48 (diff)
downloadu-boot-imx-40e81addab7bb74d20ddf681ce9babc880a828ee.zip
u-boot-imx-40e81addab7bb74d20ddf681ce9babc880a828ee.tar.gz
u-boot-imx-40e81addab7bb74d20ddf681ce9babc880a828ee.tar.bz2
Start pci hose scan from hose->current_busno.
Ensure hose->current_busno is not less than first_busno. This fixes broken board code which leaves current_busno=0 when first_busno is greater than 0 for the cases with multiple controllers. Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
Diffstat (limited to 'drivers/pci.c')
-rw-r--r--drivers/pci.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/pci.c b/drivers/pci.c
index 050582f..4158919 100644
--- a/drivers/pci.c
+++ b/drivers/pci.c
@@ -490,10 +490,16 @@ int pci_hose_scan_bus(struct pci_controller *hose, int bus)
int pci_hose_scan(struct pci_controller *hose)
{
+ /* Start scan at current_busno.
+ * PCIe will start scan at first_busno+1.
+ */
+ /* For legacy support, ensure current>=first */
+ if (hose->first_busno > hose->current_busno)
+ hose->current_busno = hose->first_busno;
#ifdef CONFIG_PCI_PNP
pciauto_config_init(hose);
#endif
- return pci_hose_scan_bus(hose, hose->first_busno);
+ return pci_hose_scan_bus(hose, hose->current_busno);
}
void pci_init(void)