diff options
author | Eric Miao <eric.miao@linaro.org> | 2012-01-12 10:21:31 +0800 |
---|---|---|
committer | Eric Miao <eric.miao@linaro.org> | 2012-01-12 10:21:31 +0800 |
commit | a48f11ebb784e84f06ddb0e1a181a7379ee8915e (patch) | |
tree | e9ba399a0f41633c390a8160c4ec564aae2a0584 /drivers/tty/serial/imx.c | |
parent | 9362902ae4bfa1ee0a67e715b506e19eb980f835 (diff) | |
parent | e4ed928467699690d1d67e96961c1f11644174ee (diff) |
Merge branch 'topic/lt-3.2-imx6-pm' into lt-3.2-imx6
* topic/lt-3.2-imx6-pm:
ARM: 7198/1: arm/imx6: add restart support for imx6q
ARM: reset: implement soft_restart for jumping to a physical address
ARM: restart: only perform setup for restart when soft-restarting
ARM: restart: remove argument to setup_mm_for_reboot()
ARM: restart: move reboot failure handing into machine_restart()
ARM: restart: add restart hook to machine_desc record
ARM: lib: add call_with_stack function for safely changing stack
ARM: imx6: remove __CPUINIT annotation from v7_invalidate_l1
ARM: imx6q: add cpu suspend/resume support in IRAM
ARM: imx6q: add compatible name of iomuxc
tty: serial: imx: Allow UART to be a source for wakeup
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r-- | drivers/tty/serial/imx.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index e018aef88df..0f4ba212fd6 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -566,6 +566,9 @@ static irqreturn_t imx_int(int irq, void *dev_id) if (sts & USR1_RTSD) imx_rtsint(irq, dev_id); + if (sts & USR1_AWAKE) + writel(USR1_AWAKE, sport->port.membase + USR1); + return IRQ_HANDLED; } @@ -1269,6 +1272,12 @@ static struct uart_driver imx_reg = { static int serial_imx_suspend(struct platform_device *dev, pm_message_t state) { struct imx_port *sport = platform_get_drvdata(dev); + unsigned int val; + + /* enable wakeup from i.MX UART */ + val = readl(sport->port.membase + UCR3); + val |= UCR3_AWAKEN; + writel(val, sport->port.membase + UCR3); if (sport) uart_suspend_port(&imx_reg, &sport->port); @@ -1279,6 +1288,12 @@ static int serial_imx_suspend(struct platform_device *dev, pm_message_t state) static int serial_imx_resume(struct platform_device *dev) { struct imx_port *sport = platform_get_drvdata(dev); + unsigned int val; + + /* disable wakeup from i.MX UART */ + val = readl(sport->port.membase + UCR3); + val &= ~UCR3_AWAKEN; + writel(val, sport->port.membase + UCR3); if (sport) uart_resume_port(&imx_reg, &sport->port); |