summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorMartyn Welch <martyn.welch@collabora.co.uk>2017-10-04 17:13:27 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-20 13:57:37 +0200
commit263763c1c5235b01b654b954d4a278c8cf5a0def (patch)
treecd6bd8c310f1732777fca5dd7843fcc224c24e02 /drivers/tty
parent9424e8b1fedbaff34df187fdb87f9a9cba2d0ff2 (diff)
serial: imx: Correct comment imx_flush_buffer()
The comment in imx_flush_buffer() states that the state of 4 registers are to be saved/restored, then only saves and restores 3 registers. The missing register (UBRC) is read only and thus can't be restored. Update the comment to reflect reality. Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/imx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index b697c1eefa74..76818a266403 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1417,10 +1417,14 @@ static void imx_flush_buffer(struct uart_port *port)
/*
* According to the Reference Manual description of the UART SRST bit:
+ *
* "Reset the transmit and receive state machines,
* all FIFOs and register USR1, USR2, UBIR, UBMR, UBRC, URXD, UTXD
- * and UTS[6-3]". As we don't need to restore the old values from
- * USR1, USR2, URXD, UTXD, only save/restore the other four registers
+ * and UTS[6-3]".
+ *
+ * We don't need to restore the old values from USR1, USR2, URXD and
+ * UTXD. UBRC is read only, so only save/restore the other three
+ * registers.
*/
ubir = readl(sport->port.membase + UBIR);
ubmr = readl(sport->port.membase + UBMR);