public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PCMCIA] [2.4] TI CardBus PCI interrupt routing fix.
@ 2004-05-13 16:06 David Vrabel
  0 siblings, 0 replies; only message in thread
From: David Vrabel @ 2004-05-13 16:06 UTC (permalink / raw)
  To: linux-kernel; +Cc: dahinds

[-- Attachment #1: Type: text/plain, Size: 511 bytes --]

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/

[-- Attachment #2: ti-cardbus-irq-routing-fix --]
[-- Type: text/plain, Size: 989 bytes --]

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);

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-05-13 16:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-05-13 16:06 [PCMCIA] [2.4] TI CardBus PCI interrupt routing fix David Vrabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox