2 * linux/arch/arm/mach-footbridge/netwinder-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>
14 #include <asm/hardware/dec21285.h>
16 /* netwinder host-specific stuff */
17 static int __init netwinder_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
19 #define DEV(v,d) ((v)<<16|(d))
20 switch (DEV(dev->vendor, dev->device)) {
21 case DEV(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142):
22 case DEV(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C885):
23 case DEV(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_YELLOWFIN):
24 return IRQ_NETWINDER_ETHER100;
26 case DEV(PCI_VENDOR_ID_WINBOND2, 0x5a5a):
27 return IRQ_NETWINDER_ETHER10;
29 case DEV(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553):
32 case DEV(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105):
33 return IRQ_ISA_HARDDISK1;
35 case DEV(PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2000):
36 case DEV(PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2010):
37 case DEV(PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_5000):
38 return IRQ_NETWINDER_VGA;
40 case DEV(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285):
44 printk(KERN_ERR "PCI: %02X:%02X [%04X:%04X] unknown device\n",
45 dev->bus->number, dev->devfn,
46 dev->vendor, dev->device);
51 struct hw_pci netwinder_pci __initdata = {
52 .setup_resources = dc21285_setup_resources,
54 .mem_offset = DC21285_PCI_MEM,
55 .swizzle = no_swizzle,
56 .map_irq = netwinder_map_irq,