aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/coyote-pci.c
diff options
context:
space:
mode:
authorKrzysztof Hałasa <khc@pm.waw.pl>2009-11-17 12:48:23 -0500
committerKrzysztof Hałasa <khc@pm.waw.pl>2009-12-05 10:58:41 -0500
commit8d3fdf31dd2066533861bb57ed7df1ae1b1f5fcc (patch)
tree5186d63c67dee5454348e55cf46d31053672d67d /arch/arm/mach-ixp4xx/coyote-pci.c
parenta8b7b34075f693632cd1483b817d4211c7a63257 (diff)
IXP4xx: Introduce IXP4XX_GPIO_IRQ(n) macro and convert IXP4xx platform files.
Signed-off-by: Krzysztof Hałasa <khc@pm.waw.pl>
Diffstat (limited to 'arch/arm/mach-ixp4xx/coyote-pci.c')
-rw-r--r--arch/arm/mach-ixp4xx/coyote-pci.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/arch/arm/mach-ixp4xx/coyote-pci.c b/arch/arm/mach-ixp4xx/coyote-pci.c
index 624f8fe83c45..b978ea8bd6f0 100644
--- a/arch/arm/mach-ixp4xx/coyote-pci.c
+++ b/arch/arm/mach-ixp4xx/coyote-pci.c
@@ -23,30 +23,26 @@
23#include <asm/irq.h> 23#include <asm/irq.h>
24#include <asm/mach/pci.h> 24#include <asm/mach/pci.h>
25 25
26#define COYOTE_PCI_SLOT0_DEVID 14 26#define SLOT0_DEVID 14
27#define COYOTE_PCI_SLOT1_DEVID 15 27#define SLOT1_DEVID 15
28 28
29/* PCI controller GPIO to IRQ pin mappings */ 29/* PCI controller GPIO to IRQ pin mappings */
30#define COYOTE_PCI_SLOT0_PIN 6 30#define SLOT0_INTA 6
31#define COYOTE_PCI_SLOT1_PIN 11 31#define SLOT1_INTA 11
32
33#define IRQ_COYOTE_PCI_SLOT0 IRQ_IXP4XX_GPIO6
34#define IRQ_COYOTE_PCI_SLOT1 IRQ_IXP4XX_GPIO11
35 32
36void __init coyote_pci_preinit(void) 33void __init coyote_pci_preinit(void)
37{ 34{
38 set_irq_type(IRQ_COYOTE_PCI_SLOT0, IRQ_TYPE_LEVEL_LOW); 35 set_irq_type(IXP4XX_GPIO_IRQ(SLOT0_INTA), IRQ_TYPE_LEVEL_LOW);
39 set_irq_type(IRQ_COYOTE_PCI_SLOT1, IRQ_TYPE_LEVEL_LOW); 36 set_irq_type(IXP4XX_GPIO_IRQ(SLOT1_INTA), IRQ_TYPE_LEVEL_LOW);
40
41 ixp4xx_pci_preinit(); 37 ixp4xx_pci_preinit();
42} 38}
43 39
44static int __init coyote_map_irq(struct pci_dev *dev, u8 slot, u8 pin) 40static int __init coyote_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
45{ 41{
46 if (slot == COYOTE_PCI_SLOT0_DEVID) 42 if (slot == SLOT0_DEVID)
47 return IRQ_COYOTE_PCI_SLOT0; 43 return IXP4XX_GPIO_IRQ(SLOT0_INTA);
48 else if (slot == COYOTE_PCI_SLOT1_DEVID) 44 else if (slot == SLOT1_DEVID)
49 return IRQ_COYOTE_PCI_SLOT1; 45 return IXP4XX_GPIO_IRQ(SLOT1_INTA);
50 else return -1; 46 else return -1;
51} 47}
52 48