Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 728e74a4 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman
Browse files

serial: imx: fix comment about UCR2_SRST and its handling for shadowing



Initially when register shadowing was introduced (commit 3a0ab62f
("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: 0aa821d8 ("serial: imx: fix cached UCR2 read on software reset")
Signed-off-by: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: default avatarStefan Agner <stefan@agner.ch>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7daf201d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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);