patch-2.4.0-test8 linux/arch/arm/mach-footbridge/cats-pci.c
Next file: linux/arch/arm/mach-footbridge/ebsa285-leds.c
Previous file: linux/arch/arm/mach-footbridge/cats-hw.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Sun Sep 3 11:19:11 2000
- Orig file:
v2.4.0-test7/linux/arch/arm/mach-footbridge/cats-pci.c
- Orig date:
Wed Dec 31 16:00:00 1969
diff -u --recursive --new-file v2.4.0-test7/linux/arch/arm/mach-footbridge/cats-pci.c linux/arch/arm/mach-footbridge/cats-pci.c
@@ -0,0 +1,37 @@
+/*
+ * linux/arch/arm/mach-footbridge/cats-pci.c
+ *
+ * PCI bios-type initialisation for PCI machines
+ *
+ * Bits taken from various places.
+ */
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+
+#include <asm/irq.h>
+#include <asm/mach/pci.h>
+
+/* cats host-specific stuff */
+static int irqmap_cats[] __initdata = { IRQ_PCI, IRQ_IN0, IRQ_IN1, IRQ_IN3 };
+
+static int __init cats_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
+{
+ if (dev->irq >= 128)
+ return dev->irq & 0x1f;
+
+ if (dev->irq >= 1 && dev->irq <= 4)
+ return irqmap_cats[dev->irq - 1];
+
+ if (dev->irq != 0)
+ printk("PCI: device %02x:%02x has unknown irq line %x\n",
+ dev->bus->number, dev->devfn, dev->irq);
+
+ return -1;
+}
+
+struct hw_pci cats_pci __initdata = {
+ init: dc21285_init,
+ swizzle: no_swizzle,
+ map_irq: cats_map_irq,
+};
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)