X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fsh%2Fboards%2Fharp%2Fsetup.c;h=05b01b8f40aa39068cf8a9df5865d5d17be793a5;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=0d64b28b0c36759793a37692e18024ea2ae60a1d;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/sh/boards/harp/setup.c b/arch/sh/boards/harp/setup.c index 0d64b28b0..05b01b8f4 100644 --- a/arch/sh/boards/harp/setup.c +++ b/arch/sh/boards/harp/setup.c @@ -54,3 +54,38 @@ int __init platform_setup(void) return 0; } + +/* + * pcibios_map_platform_irq + * + * This is board specific and returns the IRQ for a given PCI device. + * It is used by the PCI code (arch/sh/kernel/st40_pci*) + * + */ + +#define HARP_PCI_IRQ 1 +#define HARP_BRIDGE_IRQ 2 +#define OVERDRIVE_SLOT0_IRQ 0 + + +int __init pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin) +{ + switch (slot) { +#ifdef CONFIG_SH_STB1_HARP + case 2: /*This is the PCI slot on the */ + return HARP_PCI_IRQ; + case 1: /* this is the bridge */ + return HARP_BRIDGE_IRQ; +#elif defined(CONFIG_SH_STB1_OVERDRIVE) + case 1: + case 2: + case 3: + return slot - 1; +#else +#error Unknown board +#endif + default: + return -1; + } +} +