aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-06-15 17:01:58 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-06-15 17:01:58 -0400
commit8c6b44d00aca45edf69b35220ba4dce962c482f8 (patch)
treee6d011180cf99d7541c1f12d0605025353fd81c3 /arch/sh
parent8b27fc6de184d66347e4aceeb5c0a4262732cc03 (diff)
sh: pci: Allow register_pci_controller() to handle overlapping regions.
Some host controllers (such as SH7786) have overlapping regions that are fixed in hardware. The resource allocator does the right thing in managing this space already, so the conflict case is non-fatal. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r--arch/sh/drivers/pci/pci.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c
index 54d77cbb8b39..9a1c423ad167 100644
--- a/arch/sh/drivers/pci/pci.c
+++ b/arch/sh/drivers/pci/pci.c
@@ -53,12 +53,8 @@ static DEFINE_MUTEX(pci_scan_mutex);
53 53
54void __devinit register_pci_controller(struct pci_channel *hose) 54void __devinit register_pci_controller(struct pci_channel *hose)
55{ 55{
56 if (request_resource(&iomem_resource, hose->mem_resource) < 0) 56 request_resource(&iomem_resource, hose->mem_resource);
57 goto out; 57 request_resource(&ioport_resource, hose->io_resource);
58 if (request_resource(&ioport_resource, hose->io_resource) < 0) {
59 release_resource(hose->mem_resource);
60 goto out;
61 }
62 58
63 *hose_tail = hose; 59 *hose_tail = hose;
64 hose_tail = &hose->next; 60 hose_tail = &hose->next;
@@ -80,12 +76,6 @@ void __devinit register_pci_controller(struct pci_channel *hose)
80 pcibios_scanbus(hose); 76 pcibios_scanbus(hose);
81 mutex_unlock(&pci_scan_mutex); 77 mutex_unlock(&pci_scan_mutex);
82 } 78 }
83
84 return;
85
86out:
87 printk(KERN_WARNING
88 "Skipping PCI bus scan due to resource conflict\n");
89} 79}
90 80
91static int __init pcibios_init(void) 81static int __init pcibios_init(void)