]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
serial: sh-sci: Fix up PORT_SCI console output ordering.
authorSUGIOKA Toshinobu <sugioka@itonet.co.jp>
Mon, 1 Jun 2009 03:53:41 +0000 (03:53 +0000)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 2 Jun 2009 03:11:18 +0000 (12:11 +0900)
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: Toshinobu Sugioka <sugioka@itonet.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/serial/sh-sci.c

index fa4d52a6c032aade904b030f753a84b752fb1e87..a4cf1079b3129e4892fb711b5f95276055552458 100644 (file)
@@ -151,9 +151,8 @@ static void sci_poll_put_char(struct uart_port *port, unsigned char c)
                status = sci_in(port, SCxSR);
        } 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, SCxSR, SCxSR_TDxE_CLEAR(port) & ~SCxSR_TEND(port));
 }
 #endif /* CONFIG_CONSOLE_POLL || CONFIG_SERIAL_SH_SCI_CONSOLE */