serial: imx: fix comment about UCR2_SRST and its handling for shadowing
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 12 Jun 2018 09:58:37 +0000 (11:58 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 28 Jun 2018 12:02:38 +0000 (21:02 +0900)
Initially when register shadowing was introduced (commit 3a0ab62f43de
("serial: imx: implement shadow registers for UCRx and UFCR")) the logic
to handle UCR2_SRST was wrong but documented consistently. Later the
handling was fixed, but the comment was not. This change makes up leeway
for the latter.

Fixes: 0aa821d846c0 ("serial: imx: fix cached UCR2 read on software reset")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c

index 4e85357..3f2b33e 100644 (file)
@@ -314,7 +314,8 @@ static u32 imx_uart_readl(struct imx_port *sport, u32 offset)
                /*
                 * UCR2_SRST is the only bit in the cached registers that might
                 * differ from the value that was last written. As it only
-                * clears after being set, reread conditionally.
+                * automatically becomes one after being cleared, reread
+                * conditionally.
                 */
                if (!(sport->ucr2 & UCR2_SRST))
                        sport->ucr2 = readl(sport->port.membase + offset);