2 * linux/arch/arm/kernel/ftv-pci.c
4 * PCI bios-type initialisation for PCI machines
6 * Bits taken from various places.
8 #include <linux/kernel.h>
10 #include <linux/init.h>
13 #include <asm/mach/pci.h>
16 * Owing to a PCB cockup, issue A backplanes are wired thus:
18 * Slot 1 2 3 4 5 Bridge S1 S2 S3 S4
19 * IRQ D C B A A C B A D
24 * ID A31 A30 A29 A28 A27 A26 DEV4 DEV5 DEV6 DEV7
26 * Actually, this isn't too bad, because with the processor card
27 * in slot 5 on the primary bus, the IRQs rotate on both sides
31 static int irqmap_ftv[] __initdata = { IRQ_PCI_D, IRQ_PCI_C, IRQ_PCI_B, IRQ_PCI_A };
33 static int __init ftv_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
37 return irqmap_ftv[(slot - pin) & 3];
40 static u8 __init ftv_swizzle(struct pci_dev *dev, u8 *pin)
42 return PCI_SLOT(dev->devfn);
45 /* ftv host-specific stuff */
46 struct hw_pci ftv_pci __initdata = {
48 .swizzle = ftv_swizzle,
49 .map_irq = ftv_map_irq,