mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 13:41:30 +00:00
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>
This commit is contained in:
parent
2f44bbb495
commit
cae167d3d7
1 changed files with 2 additions and 2 deletions
|
@ -414,12 +414,12 @@ static void sci_init_pins_scif(struct uart_port *port, unsigned int cflag)
|
||||||
defined(CONFIG_CPU_SUBTYPE_SH7785)
|
defined(CONFIG_CPU_SUBTYPE_SH7785)
|
||||||
static inline int scif_txroom(struct uart_port *port)
|
static inline int scif_txroom(struct uart_port *port)
|
||||||
{
|
{
|
||||||
return SCIF_TXROOM_MAX - (sci_in(port, SCTFDR) & 0x7f);
|
return SCIF_TXROOM_MAX - (sci_in(port, SCTFDR) & 0xff);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int scif_rxroom(struct uart_port *port)
|
static inline int scif_rxroom(struct uart_port *port)
|
||||||
{
|
{
|
||||||
return sci_in(port, SCRFDR) & 0x7f;
|
return sci_in(port, SCRFDR) & 0xff;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static inline int scif_txroom(struct uart_port *port)
|
static inline int scif_txroom(struct uart_port *port)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue