[PATCH] pcmcia: ti113x - fall back to PCI interrupt [from 2.4.-ac]

Dominik Brodowski linux at brodo.de
Fri Jun 20 20:04:18 BST 2003


Stumbled over this patch within 2.4.21-ac. Depends on the ti113x.h burst
mode patch sent earlier.

 ti113x.h |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+)

diff -ruN linux-original/drivers/pcmcia/ti113x.h linux/drivers/pcmcia/ti113x.h
--- linux-original/drivers/pcmcia/ti113x.h	2003-06-20 19:00:37.000000000 +0200
+++ linux/drivers/pcmcia/ti113x.h	2003-06-20 19:02:18.000000000 +0200
@@ -175,6 +175,27 @@
 	new = reg & ~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.
+	 */
+	if (!socket->socket.irq_mask) {
+		int irqmux, devctl;
+
+		printk (KERN_INFO "ti113x: Routing card interrupts to PCI\n");
+
+		devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
+		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);
+	}
+
 	socket->socket.ss_entry->init = ti_init;
 	return 0;
 }



More information about the linux-pcmcia mailing list