summaryrefslogtreecommitdiff
path: root/target/linux/adm5120-2.6
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-06-11 10:07:52 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-06-11 10:07:52 +0000
commitebc6e163c35692263d5975e3fd8fbb8a38583545 (patch)
tree902eb667065ba6fc08882895915c8cb1acf2f257 /target/linux/adm5120-2.6
parentf6825fb65997bc11928de3d08f352b366d5f4c25 (diff)
downloadmtk-20170518-ebc6e163c35692263d5975e3fd8fbb8a38583545.zip
mtk-20170518-ebc6e163c35692263d5975e3fd8fbb8a38583545.tar.gz
mtk-20170518-ebc6e163c35692263d5975e3fd8fbb8a38583545.tar.bz2
Fix the irq mapping for routerboard devices (#1843)
SVN-Revision: 7560
Diffstat (limited to 'target/linux/adm5120-2.6')
-rw-r--r--target/linux/adm5120-2.6/files/arch/mips/pci/fixup-adm5120.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/target/linux/adm5120-2.6/files/arch/mips/pci/fixup-adm5120.c b/target/linux/adm5120-2.6/files/arch/mips/pci/fixup-adm5120.c
index 9f65e35..07119ef 100644
--- a/target/linux/adm5120-2.6/files/arch/mips/pci/fixup-adm5120.c
+++ b/target/linux/adm5120-2.6/files/arch/mips/pci/fixup-adm5120.c
@@ -66,11 +66,7 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
int irq;
irq = -1;
-#if 1
- /* FIXME: this code should be working on all boards? */
- if (slot > 0 && slot < 4)
- irq = ADM5120_IRQ_PCI0+slot-1;
-#else
+
switch (mips_machtype) {
case MACH_ADM5120_RB_111:
case MACH_ADM5120_RB_112:
@@ -78,14 +74,14 @@ int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
case MACH_ADM5120_RB_133C:
case MACH_ADM5120_RB_153:
if (slot > 0 && slot < 4)
- irq = ADM5120_IRQ_PCI0+slot-1;
+ irq = slot + 5;
break;
default:
if (slot > 1 && slot < 5)
- irq = ADM5120_IRQ_PCI0+slot-2;
+ irq = ADM5120_IRQ_PCI0+slot-1;
break;
}
-#endif
+
printk(KERN_INFO "PCI: mapping irq for device %s, slot:%u, pin:%u, "
"irq:%d\n", pci_name(dev), slot, pin, irq);