1 #include <linux/kernel.h>
2 #include <linux/init.h>
3 #include <linux/types.h>
10 int __init
pcibios_map_platform_irq(u8 slot
, u8 pin
, struct pci_dev
*dev
)
14 if (dev
->bus
->number
== 0) {
16 case 4: return 5; /* eth0 */
17 case 8: return 5; /* eth1 */
18 case 6: return 2; /* PCI bridge */
20 printk("PCI: Bad IRQ mapping request for slot %d\n", slot
);
25 case 0: irq
= 2; break;
26 case 1: irq
= 2; break;
27 case 2: irq
= 2; break;
28 case 3: irq
= 2; break;
29 case 4: irq
= 2; break;
30 default: irq
= -1; break;
36 static u8 __init
sh03_no_swizzle(struct pci_dev
*dev
, u8
*pin
)
39 return PCI_SLOT(dev
->devfn
);
42 static int sh03_pci_lookup_irq(struct pci_dev
*dev
, u8 slot
, u8 pin
)
46 /* now lookup the actual IRQ on a platform specific basis (pci-'platform'.c) */
47 irq
= pcibios_map_platform_irq(slot
, pin
, dev
);
49 pr_debug("PCI: Error mapping IRQ on device %s\n", pci_name(dev
));
53 pr_debug("Setting IRQ for slot %s to %d\n", pci_name(dev
), irq
);
58 void __init
pcibios_fixup_irqs(void)
60 pci_fixup_irqs(sh03_no_swizzle
, sh03_pci_lookup_irq
);