aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/pci
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-12-16 23:37:10 -0500
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-01-07 14:13:14 -0500
commit67eed58060ca2049fd59d35f426b6c7dbd51b20b (patch)
treef9e923dc2f51dbd88eac640ad9efa93f4d87c848 /arch/mips/pci
parent06df69932add8108f599ef26fcdf36c4f8125e50 (diff)
PCI: mips: use generic INTx swizzle from PCI core
Use the generic pci_common_swizzle() instead of arch-specific code. Note that pci_common_swizzle() loops based on dev->bus->self, not dev->bus->parent as the mips common_swizzle() did. I think they are equivalent for this purpose. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'arch/mips/pci')
-rw-r--r--arch/mips/pci/pci.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c
index fa63dc25125..b0eb9e75c68 100644
--- a/arch/mips/pci/pci.c
+++ b/arch/mips/pci/pci.c
@@ -149,21 +149,6 @@ out:
149 "Skipping PCI bus scan due to resource conflict\n"); 149 "Skipping PCI bus scan due to resource conflict\n");
150} 150}
151 151
152static u8 __init common_swizzle(struct pci_dev *dev, u8 *pinp)
153{
154 u8 pin = *pinp;
155
156 while (dev->bus->parent) {
157 pin = pci_swizzle_interrupt_pin(dev, pin);
158 /* Move up the chain of bridges. */
159 dev = dev->bus->self;
160 }
161 *pinp = pin;
162
163 /* The slot is the slot of the last bridge. */
164 return PCI_SLOT(dev->devfn);
165}
166
167static int __init pcibios_init(void) 152static int __init pcibios_init(void)
168{ 153{
169 struct pci_controller *hose; 154 struct pci_controller *hose;
@@ -172,7 +157,7 @@ static int __init pcibios_init(void)
172 for (hose = hose_head; hose; hose = hose->next) 157 for (hose = hose_head; hose; hose = hose->next)
173 pcibios_scanbus(hose); 158 pcibios_scanbus(hose);
174 159
175 pci_fixup_irqs(common_swizzle, pcibios_map_irq); 160 pci_fixup_irqs(pci_common_swizzle, pcibios_map_irq);
176 161
177 pci_initialized = 1; 162 pci_initialized = 1;
178 163