aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorYutaro Ebihara <ebiharaml@si-linux.com>2008-03-11 00:58:50 -0400
committerPaul Mundt <lethal@linux-sh.org>2008-03-11 00:58:50 -0400
commitcae167d3d7f22a6a54ba47e7c3623b4c45a01e2b (patch)
treea16bde3d820d2821f073df0b8c295ba0b54313ef /drivers/serial
parent2f44bbb495dd3e6d0209eff2257438ab9c570e5b (diff)
serial: sh-sci: Fix fifo stall on SH7760/SH7780/SH7785 SCIF.
There was an off-by-1 in the SCRFDR calculation that caused writes over 128-bytes to hang in the FIFO. Fix it up. Signed-off-by: Yutaro Ebihara <ebiharaml@si-linux.com> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/sh-sci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/serial/sh-sci.c b/drivers/serial/sh-sci.c
index a8c116b80bff..9d244d1644e1 100644
--- a/drivers/serial/sh-sci.c
+++ b/drivers/serial/sh-sci.c
@@ -414,12 +414,12 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
414 defined(CONFIG_CPU_SUBTYPE_SH7785) 414 defined(CONFIG_CPU_SUBTYPE_SH7785)
415static inline int scif_txroom(struct uart_port *port) 415static inline int scif_txroom(struct uart_port *port)
416{ 416{
417 return SCIF_TXROOM_MAX - (sci_in(port, SCTFDR) & 0x7f); 417 return SCIF_TXROOM_MAX - (sci_in(port, SCTFDR) & 0xff);
418} 418}
419 419
420static inline int scif_rxroom(struct uart_port *port) 420static inline int scif_rxroom(struct uart_port *port)
421{ 421{
422 return sci_in(port, SCRFDR) & 0x7f; 422 return sci_in(port, SCRFDR) & 0xff;
423} 423}
424#else 424#else
425static inline int scif_txroom(struct uart_port *port) 425static inline int scif_txroom(struct uart_port *port)