patch-2.4.22 linux-2.4.22/arch/sh/stboards/setup.c
Next file: linux-2.4.22/arch/sh64/Makefile
Previous file: linux-2.4.22/arch/sh/overdrive/setup.c
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
2003-08-25 04:44:40.000000000 -0700
- Orig file:
linux-2.4.21/arch/sh/stboards/setup.c
- Orig date:
2001-06-27 13:55:29.000000000 -0700
diff -urN linux-2.4.21/arch/sh/stboards/setup.c linux-2.4.22/arch/sh/stboards/setup.c
@@ -48,3 +48,31 @@
return 0;
}
+
+#ifdef CONFIG_PCI
+/*
+ * PCI based boards need a function that maps IRQ's to given PCI
+ * slots. This code is used by the st40 pci routines in arch/sh/kernel
+ */
+
+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;
+ }
+}
+#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)