summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ixp4xx/fsg-pci.c
diff options
context:
space:
mode:
authorKrzysztof Hałasa <khc@pm.waw.pl>2009-11-17 18:48:23 +0100
committerKrzysztof Hałasa <khc@pm.waw.pl>2009-12-05 16:58:41 +0100
commit8d3fdf31dd2066533861bb57ed7df1ae1b1f5fcc (patch)
tree5186d63c67dee5454348e55cf46d31053672d67d /arch/arm/mach-ixp4xx/fsg-pci.c
parenta8b7b34075f693632cd1483b817d4211c7a63257 (diff)
downloadblackbird-op-linux-8d3fdf31dd2066533861bb57ed7df1ae1b1f5fcc.tar.gz
blackbird-op-linux-8d3fdf31dd2066533861bb57ed7df1ae1b1f5fcc.zip
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/fsg-pci.c')
-rw-r--r--arch/arm/mach-ixp4xx/fsg-pci.c35
1 files changed, 15 insertions, 20 deletions
diff --git a/arch/arm/mach-ixp4xx/fsg-pci.c b/arch/arm/mach-ixp4xx/fsg-pci.c
index 2a1701bb3671..5a810c930624 100644
--- a/arch/arm/mach-ixp4xx/fsg-pci.c
+++ b/arch/arm/mach-ixp4xx/fsg-pci.c
@@ -22,40 +22,35 @@
#include <asm/mach/pci.h>
#include <asm/mach-types.h>
-#define FSG_PCI_MAX_DEV 3
-#define FSG_PCI_IRQ_LINES 3
+#define MAX_DEV 3
+#define IRQ_LINES 3
/* PCI controller GPIO to IRQ pin mappings */
-#define FSG_PCI_INTA_PIN 6
-#define FSG_PCI_INTB_PIN 7
-#define FSG_PCI_INTC_PIN 5
-#define IRQ_FSG_PCI_INTA IRQ_IXP4XX_GPIO6
-#define IRQ_FSG_PCI_INTB IRQ_IXP4XX_GPIO7
-#define IRQ_FSG_PCI_INTC IRQ_IXP4XX_GPIO5
+#define INTA 6
+#define INTB 7
+#define INTC 5
void __init fsg_pci_preinit(void)
{
- set_irq_type(IRQ_FSG_PCI_INTA, IRQ_TYPE_LEVEL_LOW);
- set_irq_type(IRQ_FSG_PCI_INTB, IRQ_TYPE_LEVEL_LOW);
- set_irq_type(IRQ_FSG_PCI_INTC, IRQ_TYPE_LEVEL_LOW);
-
+ set_irq_type(IXP4XX_GPIO_IRQ(INTA), IRQ_TYPE_LEVEL_LOW);
+ set_irq_type(IXP4XX_GPIO_IRQ(INTB), IRQ_TYPE_LEVEL_LOW);
+ set_irq_type(IXP4XX_GPIO_IRQ(INTC), IRQ_TYPE_LEVEL_LOW);
ixp4xx_pci_preinit();
}
static int __init fsg_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{
- static int pci_irq_table[FSG_PCI_IRQ_LINES] = {
- IRQ_FSG_PCI_INTC,
- IRQ_FSG_PCI_INTB,
- IRQ_FSG_PCI_INTA,
+ static int pci_irq_table[IRQ_LINES] = {
+ IXP4XX_GPIO_IRQ(INTC),
+ IXP4XX_GPIO_IRQ(INTB),
+ IXP4XX_GPIO_IRQ(INTA),
};
int irq = -1;
- slot = slot - 11;
+ slot -= 11;
- if (slot >= 1 && slot <= FSG_PCI_MAX_DEV &&
- pin >= 1 && pin <= FSG_PCI_IRQ_LINES)
- irq = pci_irq_table[(slot - 1)];
+ if (slot >= 1 && slot <= MAX_DEV && pin >= 1 && pin <= IRQ_LINES)
+ irq = pci_irq_table[slot - 1];
printk(KERN_INFO "%s: Mapped slot %d pin %d to IRQ %d\n",
__func__, slot, pin, irq);
OpenPOWER on IntegriCloud