- pre3:
[davej-history.git] / arch / arm / mach-footbridge / netwinder-pci.c
blob6bad74680c162493a755c48e12204e4dc24f5d89
1 /*
2 * linux/arch/arm/mach-footbridge/netwinder-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 /* netwinder host-specific stuff */
16 static int __init netwinder_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
18 #define DEV(v,d) ((v)<<16|(d))
19 switch (DEV(dev->vendor, dev->device)) {
20 case DEV(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21142):
21 case DEV(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_53C885):
22 case DEV(PCI_VENDOR_ID_NCR, PCI_DEVICE_ID_NCR_YELLOWFIN):
23 return IRQ_NETWINDER_ETHER100;
25 case DEV(PCI_VENDOR_ID_WINBOND2, 0x5a5a):
26 return IRQ_NETWINDER_ETHER10;
28 case DEV(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_83C553):
29 return 0;
31 case DEV(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105):
32 return IRQ_ISA_HARDDISK1;
34 case DEV(PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2000):
35 case DEV(PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_2010):
36 case DEV(PCI_VENDOR_ID_INTERG, PCI_DEVICE_ID_INTERG_5000):
37 return IRQ_NETWINDER_VGA;
39 case DEV(PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285):
40 return 0;
42 default:
43 printk(KERN_ERR "PCI: %02X:%02X [%04X:%04X] unknown device\n",
44 dev->bus->number, dev->devfn,
45 dev->vendor, dev->device);
46 return 0;
50 struct hw_pci netwinder_pci __initdata = {
51 init: dc21285_init,
52 swizzle: no_swizzle,
53 map_irq: netwinder_map_irq,