Commit b533e812 authored by Peter Chubb's avatar Peter Chubb Committed by Linus Torvalds

[PATCH] yenta_socket driver PCI irq routing fix

	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.
parent 66b8206b
...@@ -195,6 +195,8 @@ static struct pci_socket_ops ti_ops = { ...@@ -195,6 +195,8 @@ static struct pci_socket_ops ti_ops = {
#define ti_sysctl(socket) ((socket)->private[0]) #define ti_sysctl(socket) ((socket)->private[0])
#define ti_cardctl(socket) ((socket)->private[1]) #define ti_cardctl(socket) ((socket)->private[1])
#define ti_devctl(socket) ((socket)->private[2]) #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) static int ti113x_open(pci_socket_t *socket)
{ {
...@@ -235,7 +237,6 @@ static struct pci_socket_ops ti113x_ops = { ...@@ -235,7 +237,6 @@ static struct pci_socket_ops ti113x_ops = {
yenta_proc_setup yenta_proc_setup
}; };
#define ti_diag(socket) ((socket)->private[0])
static int ti1250_open(pci_socket_t *socket) static int ti1250_open(pci_socket_t *socket)
{ {
...@@ -244,16 +245,22 @@ static int ti1250_open(pci_socket_t *socket) ...@@ -244,16 +245,22 @@ static int ti1250_open(pci_socket_t *socket)
ti_diag(socket) &= ~(TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ); ti_diag(socket) &= ~(TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ);
if (socket->cb_irq) if (socket->cb_irq)
ti_diag(socket) |= TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ; ti_diag(socket) |= TI1250_DIAG_PCI_CSC | TI1250_DIAG_PCI_IREQ;
ti_open(socket); ti113x_open(socket);
return 0; return 0;
} }
static int ti1250_init(pci_socket_t *socket) static int ti1250_init(pci_socket_t *socket)
{ {
yenta_init(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)); config_writeb(socket, TI1250_DIAGNOSTIC, ti_diag(socket));
ti_intctl(socket);
return 0; return 0;
} }
......
...@@ -806,7 +806,7 @@ static struct cardbus_override_struct { ...@@ -806,7 +806,7 @@ static struct cardbus_override_struct {
{ PD(TI,1251A), &ti_ops }, { PD(TI,1251A), &ti_ops },
{ PD(TI,1211), &ti_ops }, { PD(TI,1211), &ti_ops },
{ PD(TI,1251B), &ti_ops }, { PD(TI,1251B), &ti_ops },
{ PD(TI,1410), &ti_ops }, { PD(TI,1410), &ti1250_ops },
{ PD(TI,1420), &ti_ops }, { PD(TI,1420), &ti_ops },
{ PD(TI,4410), &ti_ops }, { PD(TI,4410), &ti_ops },
{ PD(TI,4451), &ti_ops }, { PD(TI,4451), &ti_ops },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment