Commit a8884e34 authored by Michael Trimarchi's avatar Michael Trimarchi Committed by Paul Mundt

sh: Fix up the shared IRQ demuxer's control bit testing logic.

Correct the interrupt handler in sh4 serial device, return the correct
value and check for what is anabled in the SCSCR register. The sh7722 is
broken just sending a break using minicom.
Signed-off-by: default avatarMichael Trimarchi <trimarchimichael@yahoo.it>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 7abc404a
...@@ -797,26 +797,27 @@ static irqreturn_t sci_br_interrupt(int irq, void *ptr) ...@@ -797,26 +797,27 @@ static irqreturn_t sci_br_interrupt(int irq, void *ptr)
static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr) static irqreturn_t sci_mpxed_interrupt(int irq, void *ptr)
{ {
unsigned short ssr_status, scr_status; unsigned short ssr_status, scr_status;
struct uart_port *port = ptr; struct uart_port *port = ptr;
irqreturn_t ret = IRQ_NONE;
ssr_status = sci_in(port,SCxSR); ssr_status = sci_in(port,SCxSR);
scr_status = sci_in(port,SCSCR); scr_status = sci_in(port,SCSCR);
/* Tx Interrupt */ /* Tx Interrupt */
if ((ssr_status & 0x0020) && (scr_status & 0x0080)) if ((ssr_status & 0x0020) && (scr_status & SCI_CTRL_FLAGS_TIE))
sci_tx_interrupt(irq, ptr); ret = sci_tx_interrupt(irq, ptr);
/* Rx Interrupt */ /* Rx Interrupt */
if ((ssr_status & 0x0002) && (scr_status & 0x0040)) if ((ssr_status & 0x0002) && (scr_status & SCI_CTRL_FLAGS_RIE))
sci_rx_interrupt(irq, ptr); ret = sci_rx_interrupt(irq, ptr);
/* Error Interrupt */ /* Error Interrupt */
if ((ssr_status & 0x0080) && (scr_status & 0x0400)) if ((ssr_status & 0x0080) && (scr_status & SCI_CTRL_FLAGS_REIE))
sci_er_interrupt(irq, ptr); ret = sci_er_interrupt(irq, ptr);
/* Break Interrupt */ /* Break Interrupt */
if ((ssr_status & 0x0010) && (scr_status & 0x0200)) if ((ssr_status & 0x0010) && (scr_status & SCI_CTRL_FLAGS_REIE))
sci_br_interrupt(irq, ptr); ret = sci_br_interrupt(irq, ptr);
return IRQ_HANDLED; return ret;
} }
#if defined(CONFIG_CPU_FREQ) && defined(CONFIG_HAVE_CLK) #if defined(CONFIG_CPU_FREQ) && defined(CONFIG_HAVE_CLK)
......
...@@ -166,6 +166,7 @@ ...@@ -166,6 +166,7 @@
#if defined(CONFIG_CPU_SUBTYPE_SH7750) || \ #if defined(CONFIG_CPU_SUBTYPE_SH7750) || \
defined(CONFIG_CPU_SUBTYPE_SH7091) || \ defined(CONFIG_CPU_SUBTYPE_SH7091) || \
defined(CONFIG_CPU_SUBTYPE_SH7750R) || \ defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
defined(CONFIG_CPU_SUBTYPE_SH7722) || \
defined(CONFIG_CPU_SUBTYPE_SH7750S) || \ defined(CONFIG_CPU_SUBTYPE_SH7750S) || \
defined(CONFIG_CPU_SUBTYPE_SH7751) || \ defined(CONFIG_CPU_SUBTYPE_SH7751) || \
defined(CONFIG_CPU_SUBTYPE_SH7751R) || \ defined(CONFIG_CPU_SUBTYPE_SH7751R) || \
......
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