aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorYuan Yao <yao.yuan@freescale.com>2015-01-23 04:48:54 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-02 13:09:55 -0500
commit2fe605df325abfa2d36f63469fa960cd40d8cf50 (patch)
tree1ceb1a461fdb302b69e21980a7c32b11e18dc004 /drivers/tty
parent011f5bde62890c39440859c8077a0a5a6aca316d (diff)
serial: fsl-lpuart: disable interrupt when suspend
For power management support, we should disable TX and TX interrupt so that kernel can prepare for deep sleep. Retain RX and RX interrupt for wakeup the kernel when receive the input character. Signed-off-by: Yuan Yao <yao.yuan@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/fsl_lpuart.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index 914f9a2a0157..f196a33e619b 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1846,6 +1846,19 @@ static int lpuart_remove(struct platform_device *pdev)
1846static int lpuart_suspend(struct device *dev) 1846static int lpuart_suspend(struct device *dev)
1847{ 1847{
1848 struct lpuart_port *sport = dev_get_drvdata(dev); 1848 struct lpuart_port *sport = dev_get_drvdata(dev);
1849 unsigned long temp;
1850
1851 if (sport->lpuart32) {
1852 /* disable Rx/Tx and interrupts */
1853 temp = lpuart32_read(sport->port.membase + UARTCTRL);
1854 temp &= ~(UARTCTRL_TE | UARTCTRL_TIE | UARTCTRL_TCIE);
1855 lpuart32_write(temp, sport->port.membase + UARTCTRL);
1856 } else {
1857 /* disable Rx/Tx and interrupts */
1858 temp = readb(sport->port.membase + UARTCR2);
1859 temp &= ~(UARTCR2_TE | UARTCR2_TIE | UARTCR2_TCIE);
1860 writeb(temp, sport->port.membase + UARTCR2);
1861 }
1849 1862
1850 uart_suspend_port(&lpuart_reg, &sport->port); 1863 uart_suspend_port(&lpuart_reg, &sport->port);
1851 1864