diff options
| author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:20:51 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-04-27 12:20:51 -0400 |
| commit | ad5da3cf39a5b11a198929be1f2644e17ecd767e (patch) | |
| tree | 22d98f2a14db70e7229ec3b9c944488f2d50d4a1 /arch/mips/pci/pci.c | |
| parent | da8ac5e0fab11d0e84be4e49aaaa828c52d17097 (diff) | |
| parent | 14cf232ab161ce87ca538af3daad5f717c20d487 (diff) | |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus: (22 commits)
[MIPS] Don't force frame pointers for lockdep on MIPS
[MIPS] update vr41xx Kconfig
[MIPS] remove 2 select entries for VR41xx
[MIPS] rename VR41XX to VR4100 series
[MIPS] Use DEFINE_SPINLOCK instead of SPIN_LOCK_UNLOCKED.
[MIPS] Replace old fashioned "__typeof" with "__typeof__".
[MIPS] Remove unused _THREAD_SIZE_ORDER from asm-offset.c.
[MIPS] Change PCI host bridge setup/resources
[MIPS] Register PCI host bridge resource earlier
[MIPS] Remove pnx8550-v2pci_defconfig
[MIPS] Add bcm1480 ZBus trace support, fix wait related bugs
[MIPS] Updated Sibyte headers
[MIPS] Remove unused argument from kunmap_coherent().
[MIPS] Malta: Delete unused prototype of mips_timer_interrupt.
[MIPS] Select ZONE_DMA only if GENERIC_ISA_DMA selected
[MIPS] MIPS Tech: Get rid of volatile in core code.
[MIPS] IP22: Get rid of volatile in IP22 core code.
[MIPS] JMR3927 cleanup
[MIPS] merge GT64111 PCI routines and GT64120 PCI_0 routines
[MIPS] Cobalt: Split PCI codes from setup.c
...
Diffstat (limited to 'arch/mips/pci/pci.c')
| -rw-r--r-- | arch/mips/pci/pci.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index de7cfc559ddb..8108231f2e20 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c | |||
| @@ -77,6 +77,13 @@ pcibios_align_resource(void *data, struct resource *res, | |||
| 77 | 77 | ||
| 78 | void __init register_pci_controller(struct pci_controller *hose) | 78 | void __init register_pci_controller(struct pci_controller *hose) |
| 79 | { | 79 | { |
| 80 | if (request_resource(&iomem_resource, hose->mem_resource) < 0) | ||
| 81 | goto out; | ||
| 82 | if (request_resource(&ioport_resource, hose->io_resource) < 0) { | ||
| 83 | release_resource(hose->mem_resource); | ||
| 84 | goto out; | ||
| 85 | } | ||
| 86 | |||
| 80 | *hose_tail = hose; | 87 | *hose_tail = hose; |
| 81 | hose_tail = &hose->next; | 88 | hose_tail = &hose->next; |
| 82 | 89 | ||
| @@ -87,6 +94,11 @@ void __init register_pci_controller(struct pci_controller *hose) | |||
| 87 | printk(KERN_WARNING | 94 | printk(KERN_WARNING |
| 88 | "registering PCI controller with io_map_base unset\n"); | 95 | "registering PCI controller with io_map_base unset\n"); |
| 89 | } | 96 | } |
| 97 | return; | ||
| 98 | |||
| 99 | out: | ||
| 100 | printk(KERN_WARNING | ||
| 101 | "Skipping PCI bus scan due to resource conflict\n"); | ||
| 90 | } | 102 | } |
| 91 | 103 | ||
| 92 | /* Most MIPS systems have straight-forward swizzling needs. */ | 104 | /* Most MIPS systems have straight-forward swizzling needs. */ |
| @@ -121,11 +133,6 @@ static int __init pcibios_init(void) | |||
| 121 | /* Scan all of the recorded PCI controllers. */ | 133 | /* Scan all of the recorded PCI controllers. */ |
| 122 | for (next_busno = 0, hose = hose_head; hose; hose = hose->next) { | 134 | for (next_busno = 0, hose = hose_head; hose; hose = hose->next) { |
| 123 | 135 | ||
| 124 | if (request_resource(&iomem_resource, hose->mem_resource) < 0) | ||
| 125 | goto out; | ||
| 126 | if (request_resource(&ioport_resource, hose->io_resource) < 0) | ||
| 127 | goto out_free_mem_resource; | ||
| 128 | |||
| 129 | if (!hose->iommu) | 136 | if (!hose->iommu) |
| 130 | PCI_DMA_BUS_IS_PHYS = 1; | 137 | PCI_DMA_BUS_IS_PHYS = 1; |
| 131 | 138 | ||
| @@ -144,14 +151,6 @@ static int __init pcibios_init(void) | |||
| 144 | need_domain_info = 1; | 151 | need_domain_info = 1; |
| 145 | } | 152 | } |
| 146 | } | 153 | } |
| 147 | continue; | ||
| 148 | |||
| 149 | out_free_mem_resource: | ||
| 150 | release_resource(hose->mem_resource); | ||
| 151 | |||
| 152 | out: | ||
| 153 | printk(KERN_WARNING | ||
| 154 | "Skipping PCI bus scan due to resource conflict\n"); | ||
| 155 | } | 154 | } |
| 156 | 155 | ||
| 157 | if (!pci_probe_only) | 156 | if (!pci_probe_only) |
