pci.c (3e862dd5c94cc53ba6494804c7388303e3d25403) pci.c (d0e3db40e2a1352aa2a2f425a7d4631bddc03d51)
1/*
2 * arch/sh/drivers/pci/pci.c
3 *
4 * Copyright (c) 2002 M. R. Brown <mrbrown@linux-sh.org>
5 * Copyright (c) 2004 - 2006 Paul Mundt <lethal@linux-sh.org>
6 *
7 * These functions are collected here to reduce duplication of common
8 * code amongst the many platform-specific PCI support code files.

--- 14 unchanged lines hidden (view full) ---

23#include <asm/io.h>
24
25static int __init pcibios_init(void)
26{
27 struct pci_channel *p;
28 struct pci_bus *bus;
29 int busno;
30
1/*
2 * arch/sh/drivers/pci/pci.c
3 *
4 * Copyright (c) 2002 M. R. Brown <mrbrown@linux-sh.org>
5 * Copyright (c) 2004 - 2006 Paul Mundt <lethal@linux-sh.org>
6 *
7 * These functions are collected here to reduce duplication of common
8 * code amongst the many platform-specific PCI support code files.

--- 14 unchanged lines hidden (view full) ---

23#include <asm/io.h>
24
25static int __init pcibios_init(void)
26{
27 struct pci_channel *p;
28 struct pci_bus *bus;
29 int busno;
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
32 /* assign resources */
33 busno = 0;
41#ifdef CONFIG_PCI_AUTO
42 /* assign resources */
43 busno = 0;
34 for (p = board_pci_channels; p->pci_ops != NULL; p++)
35 busno = pciauto_assign_resources(busno, p) + 1;
44 for (p = board_pci_channels; p->init; p++)
45 if (p->enabled)
46 busno = pciauto_assign_resources(busno, p) + 1;
36#endif
37
38 /* scan the buses */
39 busno = 0;
47#endif
48
49 /* scan the buses */
50 busno = 0;
40 for (p = board_pci_channels; p->pci_ops != NULL; p++) {
41 bus = pci_scan_bus(busno, p->pci_ops, p);
42 busno = bus->subordinate + 1;
51 for (p = board_pci_channels; p->init; p++) {
52 if (p->enabled) {
53 bus = pci_scan_bus(busno, p->pci_ops, p);
54 busno = bus->subordinate + 1;
55 }
43 }
44
45 pci_fixup_irqs(pci_common_swizzle, pcibios_map_platform_irq);
46
47 dma_debug_add_bus(&pci_bus_type);
48
49 return 0;
50}

--- 127 unchanged lines hidden ---
56 }
57
58 pci_fixup_irqs(pci_common_swizzle, pcibios_map_platform_irq);
59
60 dma_debug_add_bus(&pci_bus_type);
61
62 return 0;
63}

--- 127 unchanged lines hidden ---