summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2011-06-14 04:53:34 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-06-14 04:53:34 -0400
commit4b8c59a3d83e9cf2b65b16999a0c704fc72de056 (patch)
treeac64f3684521db41692075421a1ca040b589723a /drivers/tty
parent72b294cf76dcd6d37891387049ddbe3c25043cb8 (diff)
serial: sh-sci: Support generic SCLSR overrun detection.
For all ports with a valid SCLSR register we can use the generic FIFO overrun detection logic. Test the validity of the SCLSR register rather than depending explicitly on port type, which can be ambiguous for the SCIFA/B types. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/sh-sci.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
index 60027d51bb51..8e55e0a2733a 100644
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -734,15 +734,11 @@ static int sci_handle_fifo_overrun(struct uart_port *port)
734{ 734{
735 struct tty_struct *tty = port->state->port.tty; 735 struct tty_struct *tty = port->state->port.tty;
736 struct sci_port *s = to_sci_port(port); 736 struct sci_port *s = to_sci_port(port);
737 struct plat_sci_reg *reg;
737 int copied = 0; 738 int copied = 0;
738 739
739 /* 740 reg = sci_getreg(port, SCLSR);
740 * XXX: Technically not limited to non-SCIFs, it's simply the 741 if (!reg->size)
741 * SCLSR check that is for the moment SCIF-specific. This
742 * probably wants to be revisited for SCIFA/B as well as for
743 * factoring in SCI overrun detection.
744 */
745 if (port->type != PORT_SCIF)
746 return 0; 742 return 0;
747 743
748 if ((sci_in(port, SCLSR) & (1 << s->cfg->overrun_bit))) { 744 if ((sci_in(port, SCLSR) & (1 << s->cfg->overrun_bit))) {