pci.c (85b59f5bb24aeca1a987cbb206e228bf630c8327) pci.c (bcf39352eb9e9026f7a1028d4bce3707b65f104b)
1/*
2 * New-style PCI core.
3 *
4 * Copyright (c) 2004 - 2009 Paul Mundt
5 * Copyright (c) 2002 M. R. Brown
6 *
7 * Modelled after arch/mips/pci/pci.c:
8 * Copyright (C) 2003, 04 Ralf Baechle (ralf@linux-mips.org)

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

53 pci_bus_size_bridges(bus);
54 pci_bus_assign_resources(bus);
55 pci_enable_bridges(bus);
56 }
57}
58
59static DEFINE_MUTEX(pci_scan_mutex);
60
1/*
2 * New-style PCI core.
3 *
4 * Copyright (c) 2004 - 2009 Paul Mundt
5 * Copyright (c) 2002 M. R. Brown
6 *
7 * Modelled after arch/mips/pci/pci.c:
8 * Copyright (C) 2003, 04 Ralf Baechle (ralf@linux-mips.org)

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

53 pci_bus_size_bridges(bus);
54 pci_bus_assign_resources(bus);
55 pci_enable_bridges(bus);
56 }
57}
58
59static DEFINE_MUTEX(pci_scan_mutex);
60
61void __devinit register_pci_controller(struct pci_channel *hose)
61int __devinit register_pci_controller(struct pci_channel *hose)
62{
63 if (request_resource(&iomem_resource, hose->mem_resource) < 0)
64 goto out;
65 if (request_resource(&ioport_resource, hose->io_resource) < 0) {
66 release_resource(hose->mem_resource);
67 goto out;
68 }
69

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

83 * initialization.
84 */
85 if (pci_initialized) {
86 mutex_lock(&pci_scan_mutex);
87 pcibios_scanbus(hose);
88 mutex_unlock(&pci_scan_mutex);
89 }
90
62{
63 if (request_resource(&iomem_resource, hose->mem_resource) < 0)
64 goto out;
65 if (request_resource(&ioport_resource, hose->io_resource) < 0) {
66 release_resource(hose->mem_resource);
67 goto out;
68 }
69

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

83 * initialization.
84 */
85 if (pci_initialized) {
86 mutex_lock(&pci_scan_mutex);
87 pcibios_scanbus(hose);
88 mutex_unlock(&pci_scan_mutex);
89 }
90
91 return;
91 return 0;
92
93out:
94 printk(KERN_WARNING "Skipping PCI bus scan due to resource conflict\n");
92
93out:
94 printk(KERN_WARNING "Skipping PCI bus scan due to resource conflict\n");
95 return -1;
95}
96
97static int __init pcibios_init(void)
98{
99 struct pci_channel *hose;
100
101 /* Scan all of the recorded PCI controllers. */
102 for (hose = hose_head; hose; hose = hose->next)

--- 265 unchanged lines hidden ---
96}
97
98static int __init pcibios_init(void)
99{
100 struct pci_channel *hose;
101
102 /* Scan all of the recorded PCI controllers. */
103 for (hose = hose_head; hose; hose = hose->next)

--- 265 unchanged lines hidden ---