diff options
author | Alison Wang <b18965@freescale.com> | 2016-03-02 06:00:37 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-03-15 00:34:50 +0300 |
commit | 055457ef25357d1921a8ed13ebfd32c526f12106 (patch) | |
tree | c97826f8e0ad88c7e486b4cdae2cda56d3495621 /drivers/serial/serial_mxc.c | |
parent | c5917b4b054d60c6c495f06b0538afed39dfe343 (diff) | |
download | u-boot-055457ef25357d1921a8ed13ebfd32c526f12106.tar.xz |
serial: Move carriage return before line feed for some serial drivers
In general, a carriage return needs to execute before a line feed.
The patch is to change some serial drivers based on this rule, such
as serial_mxc.c, serial_pxa.c, serial_s3c24x0.c and usbtty.c.
Signed-off-by: Alison Wang <alison.wang@nxp.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'drivers/serial/serial_mxc.c')
-rw-r--r-- | drivers/serial/serial_mxc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/serial/serial_mxc.c b/drivers/serial/serial_mxc.c index 51485c0d09..1563bb3665 100644 --- a/drivers/serial/serial_mxc.c +++ b/drivers/serial/serial_mxc.c @@ -164,15 +164,15 @@ static int mxc_serial_getc(void) static void mxc_serial_putc(const char c) { + /* If \n, also do \r */ + if (c == '\n') + serial_putc('\r'); + __REG(UART_PHYS + UTXD) = c; /* wait for transmitter to be ready */ while (!(__REG(UART_PHYS + UTS) & UTS_TXEMPTY)) WATCHDOG_RESET(); - - /* If \n, also do \r */ - if (c == '\n') - serial_putc ('\r'); } /* |