Skip to contentSkip to conversation

[2.4] TI CardBus PCI interrupt routing fix.

PCMCIA David Vrabel 1 participant 1 message May 13, 2004 Pcmcia

lore
Share & tools
lore
#0 lore raw

Hi,

ti_intctl() in drivers/pcmcia/ti113x.h tweaks the MFUNC Routing register to route interrupts via PCI. Currently it clobbers the top 24 bits of the register.

Also, certain implementations tie INTA and INTB together and use the MFUNC1 pin as a GPO thus INTB shouldn't be routed in this case.

Attached patch fixes both these issues.

David Vrabel

Signature · 4 lines
David Vrabel, Design Engineer

Arcom, Clifton Road           Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK         Web: http://www.arcom.com/
drivers/pcmcia/ti113x.h +4 -2
Index: linux-2.4.24/drivers/pcmcia/ti113x.h
===================================================================
@@ -176,7 +176,8 @@
 	 *   --rmk
 	 */
 	if (!socket->cap.irq_mask) {
-		u8 irqmux, devctl;
+		uint8_t devctl;
+		uint32_t irqmux;
 
 		devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
 		if ((devctl & TI113X_DCR_IMODE_MASK) != TI12XX_DCR_IMODE_ALL_SERIAL) {
@@ -186,7 +187,8 @@
 
 			irqmux = config_readl(socket, TI122X_IRQMUX);
 			irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
-			irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
+			if (!(config_readl(socket, TI113X_SYSTEM_CONTROL) & TI122X_SCR_INTRTIE))
+				irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB if INTA and INTB aren't tied */
 
 			config_writel(socket, TI122X_IRQMUX, irqmux);
 			config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);