Commit dd0a3e77 authored by SUGIOKA Toshinobu's avatar SUGIOKA Toshinobu Committed by Paul Mundt

serial: sh-sci: Fix up PORT_SCI console output ordering.

Fix SCI transmission sequence in console output function.

This reorders the write sequence to match the SH-3 manual, and corrects
a console corruption bug observed on SH-3 SCI.
Signed-off-by: default avatarToshinobu Sugioka <sugioka@itonet.co.jp>
Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent 47785414
...@@ -151,9 +151,8 @@ static void sci_poll_put_char(struct uart_port *port, unsigned char c) ...@@ -151,9 +151,8 @@ static void sci_poll_put_char(struct uart_port *port, unsigned char c)
status = sci_in(port, SCxSR); status = sci_in(port, SCxSR);
} while (!(status & SCxSR_TDxE(port))); } while (!(status & SCxSR_TDxE(port)));
sci_in(port, SCxSR); /* Dummy read */
sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port) & ~SCxSR_TEND(port));
sci_out(port, SCxTDR, c); sci_out(port, SCxTDR, c);
sci_out(port, SCxSR, SCxSR_TDxE_CLEAR(port) & ~SCxSR_TEND(port));
} }
#endif /* CONFIG_CONSOLE_POLL || CONFIG_SERIAL_SH_SCI_CONSOLE */ #endif /* CONFIG_CONSOLE_POLL || CONFIG_SERIAL_SH_SCI_CONSOLE */
......
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