[lkml]   [2001]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] Making TI bridges work with kernel PCMCIA

The driver for Cardbus/PCMCIA bridges (yenta_socket) doesn't initialize
the irqmux register of TI bridges. In fact, the driver doesn't even
access that register.

My experience shows that relying in the initial values of that register is
not a good idea. It is set to use ISA interrupts, but they don't work
with either of two motherboards I tested the bridge with.

CardBus bridge: Texas Instruments PCI1410 PC card Cardbus Controller (rev 01)

Fisrt system:
Athlon 1GHz, motherboard AOpen KT-133.

Second system:
Compaq AP500, 2 x Pentium II, motherboard with Intel 440BX chipset.

This patch makes the same thing as "irq_mode=0" does in the standalone
PCMCIA driver (i82365). It means that PCMCIA cards inserted to the socket
have their interrupt redirected to the same PCI interrupt that is used for
the Card Status Change (csc) notification. I believe that's the safest
behavior, as it avoids probing ISA interupts.

Since the patch changes ti_open(), it affects all TI bridges. This should
be the right thing to do according to the pcmcia-cs sources. I'm a bit
surprized that the driver doesn't access those registers at all except
some old TI113x models.

The code with TI122X_SCR_INTRTIE has been copied from pcmcia-cs without
changes. It should only affect two-socket bridges.

The patch is against 2.4.17-rc2.

--- linux.orig/drivers/pcmcia/ti113x.h
+++ linux/drivers/pcmcia/ti113x.h
@@ -150,11 +150,27 @@
static int ti_open(pci_socket_t *socket)
+ u32 irqmux;
+ u8 devctl, sysctl;
u8 new, reg = exca_readb(socket, I365_INTCTL);

new = reg & ~I365_INTR_ENA;
if (new != reg)
exca_writeb(socket, I365_INTCTL, new);
+ /* Disable ISA interrupt routing ... */
+ devctl = config_readb(socket, TI113X_DEVICE_CONTROL);
+ devctl &= ~TI113X_DCR_IMODE_MASK;
+ config_writeb(socket, TI113X_DEVICE_CONTROL, devctl);
+ /* ... and enable PCI routing instead */
+ sysctl = config_readb(socket, TI113X_SYSTEM_CONTROL);
+ irqmux = config_readl(socket, TI122X_IRQMUX);
+ irqmux = (irqmux & ~0x0f) | 0x02; /* route INTA */
+ if (!(sysctl & TI122X_SCR_INTRTIE)) {
+ irqmux = (irqmux & ~0xf0) | 0x20; /* route INTB */
+ }
+ config_writel(socket, TI122X_IRQMUX, irqmux);
return 0;

Pavel Roskin

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:14    [W:0.110 / U:2.764 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site