Skip to contentSkip to conversation

Start pci hose scan from current busno

PATCH New Ed Swarthout 4 participants 4 messages Mar 6, 2007 – Mar 13, 2007

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Start pci hose scan from current busno

Start the pci hose scan from hose->current_busno instead of first_busno. This allows the PCIe controllers to be scanned downstream from bridge.

Ensure hose->current_busno is equal or greater than first_busno. This fixes broken board code which leave current_busno=0 when first_busno is greater than 0 for the cases with multiple controllers.

---

This change will simplify the pending common PCI and PCIe code for the fsl 85xx and 86xx soc boards.

 drivers/pci.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
drivers/pci.c +7 -1
index 050582f..4158919 100644
@@ -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)
Signature · 1 line
1.5.0.2.279.g4808
#1 lore raw

PATCH 1/1 Start pci hose scan from current busno

Quoted 9 lines · Ed Swarthout

Start the pci hose scan from hose->current_busno instead of first_busno. This allows the PCIe controllers to be scanned downstream from bridge.

Ensure hose->current_busno is equal or greater than first_busno. This fixes broken board code which leave current_busno=0 when first_busno is greater than 0 for the cases with multiple controllers.

jdl

#2 lore raw

PATCH 1/1 Start pci hose scan from current busno

In reply to Ed Swarthout
Quoted 9 lines · Ed Swarthout

Start the pci hose scan from hose->current_busno instead of first_busno. This allows the PCIe controllers to be scanned downstream from bridge.

Ensure hose->current_busno is equal or greater than first_busno. This fixes broken board code which leave current_busno=0 when first_busno is greater than 0 for the cases with multiple controllers.

Andy

#3 lore raw

PATCH 1/1 Start pci hose scan from current busno

In reply to Ed Swarthout
Quoted 9 lines · Ed Swarthout

Start the pci hose scan from hose->current_busno instead of first_busno. This allows the PCIe controllers to be scanned downstream from bridge.

Ensure hose->current_busno is equal or greater than first_busno. This fixes broken board code which leave current_busno=0 when first_busno is greater than 0 for the cases with multiple controllers.

- k