From: Fabian Godehardt Date: Thu, 11 Jun 2009 13:38:38 +0000 (+0100) Subject: imx: serial: be sure to stop xmit upon shutdown X-Git-Tag: firefly_0821_release~13989^2~6 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2e1463922a35584c863f71d4021e1e71f76eaed0;p=firefly-linux-kernel-4.4.55.git imx: serial: be sure to stop xmit upon shutdown needed to avoid continued transmission by hardware while software already shuts down, which might cause dangling characters to show up in hardware queues when restarting the device. Signed-off-by: Fabian Godehardt Signed-off-by: Oskar Schirmer Signed-off-by: Alan Cox Signed-off-by: Linus Torvalds --- diff --git a/drivers/serial/imx.c b/drivers/serial/imx.c index 49f2e12ba58d..e6c2ba26dcbb 100644 --- a/drivers/serial/imx.c +++ b/drivers/serial/imx.c @@ -634,6 +634,10 @@ static void imx_shutdown(struct uart_port *port) struct imx_port *sport = (struct imx_port *)port; unsigned long temp; + temp = readl(sport->port.membase + UCR2); + temp &= ~(UCR2_TXEN); + writel(temp, sport->port.membase + UCR2); + /* * Stop our timer. */