[PCMCIA] [2.4] TI CardBus PCI interrupt routing fix.
From: David Vrabel
Date: Thu May 13 2004 - 11:06:58 EST
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
--
David Vrabel, Design Engineer
Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/
Index: linux-2.4.24/drivers/pcmcia/ti113x.h
===================================================================
--- linux-2.4.24.orig/drivers/pcmcia/ti113x.h 2004-05-12 17:52:40.000000000 +0100
+++ linux-2.4.24/drivers/pcmcia/ti113x.h 2004-05-13 16:33:53.000000000 +0100
@@ -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);