- pre3:
[davej-history.git] / arch / arm / mach-footbridge / cats-pci.c
blob1f9e198bac88556a63a5d28684e21432270640c1
1 /*
2 * linux/arch/arm/mach-footbridge/cats-pci.c
4 * PCI bios-type initialisation for PCI machines
6 * Bits taken from various places.
7 */
8 #include <linux/kernel.h>
9 #include <linux/pci.h>
10 #include <linux/init.h>
12 #include <asm/irq.h>
13 #include <asm/mach/pci.h>
15 /* cats host-specific stuff */
16 static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
18 static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
20 if (dev->irq >= 128)
21 return dev->irq & 0x1f;
23 if (dev->irq >= 1 && dev->irq <= 4)
24 return irqmap_cats[dev->irq - 1];
26 if (dev->irq != 0)
27 printk("PCI: device %02x:%02x has unknown irq line %x\n",
28 dev->bus->number, dev->devfn, dev->irq);
30 return -1;
33 struct hw_pci cats_pci __initdata = {
34 init: dc21285_init,
35 swizzle: no_swizzle,
36 map_irq: cats_map_irq,