summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorHuang Shijie <b32955@freescale.com>2014-06-13 15:41:07 +0800
committerHuang Shijie <b32955@freescale.com>2014-06-18 12:58:34 +0800
commitc8a2b65c18b1fb280cb0b2a0e65e8fcb9db3bef3 (patch)
tree5f029344a1d0fbd1060e7559d15b091e82a06fda /drivers/tty
parent0431bb5a1b60856d015b463743e887099164c55a (diff)
ENGR00318938-4 serial: imx: add support for no_console_suspend
this patch adds the support for kernel cmdline "no_console_suspend". Signed-off-by: Huang Shijie <b32955@freescale.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/imx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 2570a32bec19..fc82b6efb0ef 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1815,6 +1815,9 @@ static int serial_imx_suspend(struct platform_device *dev, pm_message_t state)
struct imx_port *sport = platform_get_drvdata(dev);
unsigned int val;
+ if (!console_suspend_enabled)
+ enable_irq_wake(sport->port.irq);
+
/* enable wakeup from i.MX UART */
val = readl(sport->port.membase + UCR3);
val |= UCR3_AWAKEN;
@@ -1860,6 +1863,9 @@ static int serial_imx_resume(struct platform_device *dev)
val &= ~UCR3_AWAKEN;
writel(val, sport->port.membase + UCR3);
+ if (!console_suspend_enabled)
+ disable_irq_wake(sport->port.irq);
+
uart_resume_port(&imx_reg, &sport->port);
return 0;