- pre3:
[davej-history.git] / arch / arm / mach-footbridge / ebsa285-pci.c
blob304079040b824835dcab5970a2af26636bf5c15d
1 /*
2 * linux/arch/arm/mach-footbridge/ebsa285-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 static int irqmap_ebsa285[] __initdata = { IRQ_IN3, IRQ_IN1, IRQ_IN0, IRQ_PCI };
17 static u8 __init ebsa285_swizzle(struct pci_dev *dev, u8 *pin)
19 return PCI_SLOT(dev->devfn);
22 static int __init ebsa285_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
24 if (dev->vendor == PCI_VENDOR_ID_CONTAQ &&
25 dev->device == PCI_DEVICE_ID_CONTAQ_82C693)
26 switch (PCI_FUNC(dev->devfn)) {
27 case 1: return 14;
28 case 2: return 15;
29 case 3: return 12;
32 return irqmap_ebsa285[(slot + pin) & 3];
35 struct hw_pci ebsa285_pci __initdata = {
36 init: dc21285_init,
37 swizzle: ebsa285_swizzle,
38 map_irq: ebsa285_map_irq,