* [PATCH] serial: imx: Correct comment imx_flush_buffer()
@ 2017-09-29 9:22 Martyn Welch
2017-10-03 18:27 ` Greg Kroah-Hartman
0 siblings, 1 reply; 3+ messages in thread
From: Martyn Welch @ 2017-09-29 9:22 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Jiri Slaby, linux-serial, linux-kernel, Martyn Welch
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>
---
drivers/tty/serial/imx.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 474b5bc..63f544e 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1415,10 +1415,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);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: imx: Correct comment imx_flush_buffer()
2017-09-29 9:22 [PATCH] serial: imx: Correct comment imx_flush_buffer() Martyn Welch
@ 2017-10-03 18:27 ` Greg Kroah-Hartman
2017-10-04 16:12 ` Martyn Welch
0 siblings, 1 reply; 3+ messages in thread
From: Greg Kroah-Hartman @ 2017-10-03 18:27 UTC (permalink / raw)
To: Martyn Welch; +Cc: Jiri Slaby, linux-serial, linux-kernel
On Fri, Sep 29, 2017 at 10:22:19AM +0100, Martyn Welch wrote:
> 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.
Always run checkpatch.pl so you don't get grumpy maintainers telling you
to run checkpatch.pl :(
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] serial: imx: Correct comment imx_flush_buffer()
2017-10-03 18:27 ` Greg Kroah-Hartman
@ 2017-10-04 16:12 ` Martyn Welch
0 siblings, 0 replies; 3+ messages in thread
From: Martyn Welch @ 2017-10-04 16:12 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: Jiri Slaby, linux-serial, linux-kernel
On Tue, 2017-10-03 at 20:27 +0200, Greg Kroah-Hartman wrote:
> On Fri, Sep 29, 2017 at 10:22:19AM +0100, Martyn Welch wrote:
> > 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.
>
> Always run checkpatch.pl so you don't get grumpy maintainers telling you
> to run checkpatch.pl :(
Sorry Greg, must have got out of sync on that one :-(
Martyn
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-10-04 16:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-29 9:22 [PATCH] serial: imx: Correct comment imx_flush_buffer() Martyn Welch
2017-10-03 18:27 ` Greg Kroah-Hartman
2017-10-04 16:12 ` Martyn Welch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).