aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/drivers/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sh/drivers/pci/pci.c')
-rw-r--r--arch/sh/drivers/pci/pci.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 0d6ac7a1db49..29ec16e69afa 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -28,18 +28,31 @@ static int __init pcibios_init(void)
28 struct pci_bus *bus; 28 struct pci_bus *bus;
29 int busno; 29 int busno;
30 30
31 /* init channels */
32 busno = 0;
33 for (p = board_pci_channels; p->init; p++) {
34 if (p->init(p) == 0)
35 p->enabled = 1;
36 else
37 pr_err("Unable to init pci channel %d\n", busno);
38 busno++;
39 }
40
31#ifdef CONFIG_PCI_AUTO 41#ifdef CONFIG_PCI_AUTO
32 /* assign resources */ 42 /* assign resources */
33 busno = 0; 43 busno = 0;
34 for (p = board_pci_channels; p->pci_ops != NULL; p++) 44 for (p = board_pci_channels; p->init; p++)
35 busno = pciauto_assign_resources(busno, p) + 1; 45 if (p->enabled)
46 busno = pciauto_assign_resources(busno, p) + 1;
36#endif 47#endif
37 48
38 /* scan the buses */ 49 /* scan the buses */
39 busno = 0; 50 busno = 0;
40 for (p = board_pci_channels; p->pci_ops != NULL; p++) { 51 for (p = board_pci_channels; p->init; p++) {
41 bus = pci_scan_bus(busno, p->pci_ops, p); 52 if (p->enabled) {
42 busno = bus->subordinate + 1; 53 bus = pci_scan_bus(busno, p->pci_ops, p);
54 busno = bus->subordinate + 1;
55 }
43 } 56 }
44 57
45 pci_fixup_irqs(pci_common_swizzle, pcibios_map_platform_irq); 58 pci_fixup_irqs(pci_common_swizzle, pcibios_map_platform_irq);