|
@@ -278,3 +278,133 @@ static void __init
|
|
|
dp264_init_irq(void)
|
|
|
{
|
|
|
outb(0, DMA1_RESET_REG);
|
|
|
+ outb(0, DMA2_RESET_REG);
|
|
|
+ outb(DMA_MODE_CASCADE, DMA2_MODE_REG);
|
|
|
+ outb(0, DMA2_MASK_REG);
|
|
|
+
|
|
|
+ if (alpha_using_srm)
|
|
|
+ alpha_mv.device_interrupt = dp264_srm_device_interrupt;
|
|
|
+
|
|
|
+ tsunami_update_irq_hw(0);
|
|
|
+
|
|
|
+ init_i8259a_irqs();
|
|
|
+ init_tsunami_irqs(&dp264_irq_type, 16, 47);
|
|
|
+}
|
|
|
+
|
|
|
+static void __init
|
|
|
+clipper_init_irq(void)
|
|
|
+{
|
|
|
+ outb(0, DMA1_RESET_REG);
|
|
|
+ outb(0, DMA2_RESET_REG);
|
|
|
+ outb(DMA_MODE_CASCADE, DMA2_MODE_REG);
|
|
|
+ outb(0, DMA2_MASK_REG);
|
|
|
+
|
|
|
+ if (alpha_using_srm)
|
|
|
+ alpha_mv.device_interrupt = clipper_srm_device_interrupt;
|
|
|
+
|
|
|
+ tsunami_update_irq_hw(0);
|
|
|
+
|
|
|
+ init_i8259a_irqs();
|
|
|
+ init_tsunami_irqs(&clipper_irq_type, 24, 63);
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+/*
|
|
|
+ * PCI Fixup configuration.
|
|
|
+ *
|
|
|
+ * Summary @ TSUNAMI_CSR_DIM0:
|
|
|
+ * Bit Meaning
|
|
|
+ * 0-17 Unused
|
|
|
+ *18 Interrupt SCSI B (Adaptec 7895 builtin)
|
|
|
+ *19 Interrupt SCSI A (Adaptec 7895 builtin)
|
|
|
+ *20 Interrupt Line D from slot 2 PCI0
|
|
|
+ *21 Interrupt Line C from slot 2 PCI0
|
|
|
+ *22 Interrupt Line B from slot 2 PCI0
|
|
|
+ *23 Interrupt Line A from slot 2 PCI0
|
|
|
+ *24 Interrupt Line D from slot 1 PCI0
|
|
|
+ *25 Interrupt Line C from slot 1 PCI0
|
|
|
+ *26 Interrupt Line B from slot 1 PCI0
|
|
|
+ *27 Interrupt Line A from slot 1 PCI0
|
|
|
+ *28 Interrupt Line D from slot 0 PCI0
|
|
|
+ *29 Interrupt Line C from slot 0 PCI0
|
|
|
+ *30 Interrupt Line B from slot 0 PCI0
|
|
|
+ *31 Interrupt Line A from slot 0 PCI0
|
|
|
+ *
|
|
|
+ *32 Interrupt Line D from slot 3 PCI1
|
|
|
+ *33 Interrupt Line C from slot 3 PCI1
|
|
|
+ *34 Interrupt Line B from slot 3 PCI1
|
|
|
+ *35 Interrupt Line A from slot 3 PCI1
|
|
|
+ *36 Interrupt Line D from slot 2 PCI1
|
|
|
+ *37 Interrupt Line C from slot 2 PCI1
|
|
|
+ *38 Interrupt Line B from slot 2 PCI1
|
|
|
+ *39 Interrupt Line A from slot 2 PCI1
|
|
|
+ *40 Interrupt Line D from slot 1 PCI1
|
|
|
+ *41 Interrupt Line C from slot 1 PCI1
|
|
|
+ *42 Interrupt Line B from slot 1 PCI1
|
|
|
+ *43 Interrupt Line A from slot 1 PCI1
|
|
|
+ *44 Interrupt Line D from slot 0 PCI1
|
|
|
+ *45 Interrupt Line C from slot 0 PCI1
|
|
|
+ *46 Interrupt Line B from slot 0 PCI1
|
|
|
+ *47 Interrupt Line A from slot 0 PCI1
|
|
|
+ *48-52 Unused
|
|
|
+ *53 PCI0 NMI (from Cypress)
|
|
|
+ *54 PCI0 SMI INT (from Cypress)
|
|
|
+ *55 PCI0 ISA Interrupt (from Cypress)
|
|
|
+ *56-60 Unused
|
|
|
+ *61 PCI1 Bus Error
|
|
|
+ *62 PCI0 Bus Error
|
|
|
+ *63 Reserved
|
|
|
+ *
|
|
|
+ * IdSel
|
|
|
+ * 5 Cypress Bridge I/O
|
|
|
+ * 6 SCSI Adaptec builtin
|
|
|
+ * 7 64 bit PCI option slot 0 (all busses)
|
|
|
+ * 8 64 bit PCI option slot 1 (all busses)
|
|
|
+ * 9 64 bit PCI option slot 2 (all busses)
|
|
|
+ * 10 64 bit PCI option slot 3 (not bus 0)
|
|
|
+ */
|
|
|
+
|
|
|
+static int __init
|
|
|
+isa_irq_fixup(const struct pci_dev *dev, int irq)
|
|
|
+{
|
|
|
+ u8 irq8;
|
|
|
+
|
|
|
+ if (irq > 0)
|
|
|
+ return irq;
|
|
|
+
|
|
|
+ /* This interrupt is routed via ISA bridge, so we'll
|
|
|
+ just have to trust whatever value the console might
|
|
|
+ have assigned. */
|
|
|
+ pci_read_config_byte(dev, PCI_INTERRUPT_LINE, &irq8);
|
|
|
+
|
|
|
+ return irq8 & 0xf;
|
|
|
+}
|
|
|
+
|
|
|
+static int __init
|
|
|
+dp264_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
|
|
+{
|
|
|
+ static char irq_tab[6][5] __initdata = {
|
|
|
+ /*INT INTA INTB INTC INTD */
|
|
|
+ { -1, -1, -1, -1, -1}, /* IdSel 5 ISA Bridge */
|
|
|
+ { 16+ 3, 16+ 3, 16+ 2, 16+ 2, 16+ 2}, /* IdSel 6 SCSI builtin*/
|
|
|
+ { 16+15, 16+15, 16+14, 16+13, 16+12}, /* IdSel 7 slot 0 */
|
|
|
+ { 16+11, 16+11, 16+10, 16+ 9, 16+ 8}, /* IdSel 8 slot 1 */
|
|
|
+ { 16+ 7, 16+ 7, 16+ 6, 16+ 5, 16+ 4}, /* IdSel 9 slot 2 */
|
|
|
+ { 16+ 3, 16+ 3, 16+ 2, 16+ 1, 16+ 0} /* IdSel 10 slot 3 */
|
|
|
+ };
|
|
|
+ const long min_idsel = 5, max_idsel = 10, irqs_per_slot = 5;
|
|
|
+ struct pci_controller *hose = dev->sysdata;
|
|
|
+ int irq = COMMON_TABLE_LOOKUP;
|
|
|
+
|
|
|
+ if (irq > 0)
|
|
|
+ irq += 16 * hose->index;
|
|
|
+
|
|
|
+ return isa_irq_fixup(dev, irq);
|
|
|
+}
|
|
|
+
|
|
|
+static int __init
|
|
|
+monet_map_irq(const struct pci_dev *dev, u8 slot, u8 pin)
|
|
|
+{
|
|
|
+ static char irq_tab[13][5] __initdata = {
|
|
|
+ /*INT INTA INTB INTC INTD */
|
|
|
+ { 45, 45, 45, 45, 45}, /* IdSel 3 21143 PCI1 */
|