patch-2.4.22 linux-2.4.22/drivers/pcmcia/ti113x.h
Next file: linux-2.4.22/drivers/s390/Config.in
Previous file: linux-2.4.22/drivers/pcmcia/rsrc_mgr.c
Back to the patch index
Back to the overall index
- Lines: 33
- Date:
2003-08-25 04:44:42.000000000 -0700
- Orig file:
linux-2.4.21/drivers/pcmcia/ti113x.h
- Orig date:
2002-11-28 15:53:14.000000000 -0800
diff -urN linux-2.4.21/drivers/pcmcia/ti113x.h linux-2.4.22/drivers/pcmcia/ti113x.h
@@ -167,6 +167,32 @@
new |= I365_INTR_ENA;
if (new != reg)
exca_writeb(socket, I365_INTCTL, new);
+
+ /*
+ * If ISA interrupts don't work, then fall back to routing card
+ * interrupts to the PCI interrupt of the socket.
+ *
+ * Tweaking this when we are using serial PCI IRQs causes hangs
+ * --rmk
+ */
+ if (!socket->cap.irq_mask) {
+ u8 irqmux, devctl;
+
+ devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
+ if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {
+ printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n");
+
+ devctl &= ~TI113X_DCR_IMODE_MASK;
+
+ irqmux = config_readl(socket, TI122X_IRQMUX);
+ irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
+ irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
+
+ config_writel(socket, TI122X_IRQMUX, irqmux);
+ config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
+ }
+ }
+
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)