imx: serial: be sure to stop xmit upon shutdown
authorFabian Godehardt <fg@emlix.com>
Thu, 11 Jun 2009 13:38:38 +0000 (14:38 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 11 Jun 2009 15:51:08 +0000 (08:51 -0700)
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 <fg@emlix.com>
Signed-off-by: Oskar Schirmer <os@emlix.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/imx.c

index 49f2e12ba58d2d35b6b967fd3f334159458e8f50..e6c2ba26dcbb191f0007cb4b0b6e9821b060e6fe 100644 (file)
@@ -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.
         */