lkml.org 
[lkml]   [2002]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Date
Subjectyenta_socket driver PCI irq routing fix

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/
\
 
 \ /
  Last update: 2005-03-22 13:26    [W:1.429 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site