yenta_socket driver PCI irq routing fix

From: Peter Chubb (peter@chubb.wattle.id.au)
Date: Tue Jun 11 2002 - 21:03:23 EST


Hi,
        This patch fixes the Compaq WL210 problems I've been having.

The symptoms were that no interupts were ever received from the card;
the BIOS reported it had assigned INTA to IRQ 10; but the yenta
driver reported IRQ 17.

The fix is not to rely on the BIOS's initialisation of interrupt
routing in the TI1410, but to do it explicitly.

This may break laptops that actually use the parallel ISA IRQ
mechanism.

Disclaimer: I don't really understand this code. Better fixes welcome.

===== drivers/pcmcia/ti113x.h 1.2 vs edited =====
--- 1.2/drivers/pcmcia/ti113x.h Tue Feb 5 18:37:44 2002
+++ edited/drivers/pcmcia/ti113x.h Wed Jun 12 11:50:39 2002
@@ -195,6 +195,8 @@
 #define ti_sysctl(socket) ((socket)->private[0])
 #define ti_cardctl(socket) ((socket)->private[1])
 #define ti_devctl(socket) ((socket)->private[2])
+#define ti_diag(socket) ((socket)->private[3])
+#define ti_irqmux(socket) ((socket)->private[4])
 
 static int ti113x_open(pci_socket_t *socket)
 {
@@ -235,7 +237,6 @@
         yenta_proc_setup
 };
 
-#define ti_diag(socket) ((socket)->private[0])
 
 static int ti1250_open(pci_socket_t *socket)
 {
@@ -244,16 +245,22 @@
         ti_diag(socket) &= ~(TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ);
         if (socket->cb_irq)
                 ti_diag(socket) |= TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ;
- ti_open(socket);
+ ti113x_open(socket);
         return 0;
 }
 
 static int ti1250_init(pci_socket_t *socket)
 {
         yenta_init(socket);
-
+ ti113x_init(socket);
+ ti_irqmux(socket) = config_readl(socket, TI122X_IRQMUX);
+ ti_irqmux(socket) = (ti_irqmux(socket) & ~0x0f) | 0x02; /* route INTA */
+ if (!(ti_sysctl(socket) & TI122X_SCR_INTRTIE))
+ ti_irqmux(socket) |= 0x20; /* route INTB */
+
+ config_writel(socket, TI122X_IRQMUX, ti_irqmux(socket));
+
         config_writeb(socket, TI1250_DIAGNOSTIC, ti_diag(socket));
- ti_intctl(socket);
         return 0;
 }
 
===== drivers/pcmcia/yenta.c 1.10 vs edited =====
--- 1.10/drivers/pcmcia/yenta.c Tue Feb 5 18:55:41 2002
+++ edited/drivers/pcmcia/yenta.c Wed Jun 12 11:40:59 2002
@@ -806,7 +806,7 @@
         { PD(TI,1251A), &ti_ops },
         { PD(TI,1211), &ti_ops },
         { PD(TI,1251B), &ti_ops },
- { PD(TI,1410), &ti_ops },
+ { PD(TI,1410), &ti1250_ops },
         { PD(TI,1420), &ti_ops },
         { PD(TI,4410), &ti_ops },
         { PD(TI,4451), &ti_ops },
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:24 EST