summaryrefslogtreecommitdiff
path: root/target/linux/ixp4xx/patches-3.10/300-avila_support.patch
diff options
context:
space:
mode:
authorjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-07-03 17:51:54 +0000
committerjogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73>2013-07-03 17:51:54 +0000
commit9292b6cc5d400c0b5c0a66993cbcf3fcf7d6694d (patch)
treeef37d6c9f5cd1e66ba5b51adc8e446e1c16195d6 /target/linux/ixp4xx/patches-3.10/300-avila_support.patch
parent9de9f7816d9be227493ec1b8982eeae584c103e7 (diff)
ixp4xx: replace magic number with macros in avila/ixdp425/miccpt PCI routing setup
Replace magic number with the appropriate macro in avila/ixdp425/miccpt PCI routing setup. Signed-off-by: Tamas TEVESZ <ice@extreme.hu> Signed-off-by: Jonas Gorski <jogo@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37154 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ixp4xx/patches-3.10/300-avila_support.patch')
-rw-r--r--target/linux/ixp4xx/patches-3.10/300-avila_support.patch6
1 files changed, 4 insertions, 2 deletions
diff --git a/target/linux/ixp4xx/patches-3.10/300-avila_support.patch b/target/linux/ixp4xx/patches-3.10/300-avila_support.patch
index 12c82cc8db..b1ca379332 100644
--- a/target/linux/ixp4xx/patches-3.10/300-avila_support.patch
+++ b/target/linux/ixp4xx/patches-3.10/300-avila_support.patch
@@ -11,17 +11,19 @@
#define IRQ_LINES 4
/* PCI controller GPIO to IRQ pin mappings */
-@@ -55,9 +55,7 @@ static int __init avila_map_irq(const st
+@@ -55,10 +55,8 @@ static int __init avila_map_irq(const st
IXP4XX_GPIO_IRQ(INTD)
};
- if (slot >= 1 &&
- slot <= (machine_is_loft() ? LOFT_MAX_DEV : AVILA_MAX_DEV) &&
- pin >= 1 && pin <= IRQ_LINES)
+- return pci_irq_table[(slot + pin - 2) % 4];
+ if (slot >= 1 && slot <= AVILA_MAX_DEV && pin >= 1 && pin <= IRQ_LINES)
- return pci_irq_table[(slot + pin - 2) % 4];
++ return pci_irq_table[(slot + pin - 2) % IRQ_LINES];
return -1;
+ }
--- a/arch/arm/mach-ixp4xx/avila-setup.c
+++ b/arch/arm/mach-ixp4xx/avila-setup.c
@@ -14,9 +14,16 @@