mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
serial: imx: Only wakeup via RTSDEN bit if the system has RTS/CTS
The wakeup mechanism via RTSDEN bit relies on the system using the RTS/CTS
lines, so only allow such wakeup method when the system actually has
RTS/CTS support.
Fixes: bc85734b12 ("serial: imx: allow waking up on RTSD")
Signed-off-by: Fabio Estevam <[email protected]>
Reviewed-by: Martin Kaiser <[email protected]>
Acked-by: Fugang Duan <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
7defa77d2b
commit
38b1f0fb42
1 changed files with 8 additions and 6 deletions
|
|
@ -2225,12 +2225,14 @@ static void serial_imx_enable_wakeup(struct imx_port *sport, bool on)
|
|||
val &= ~UCR3_AWAKEN;
|
||||
writel(val, sport->port.membase + UCR3);
|
||||
|
||||
val = readl(sport->port.membase + UCR1);
|
||||
if (on)
|
||||
val |= UCR1_RTSDEN;
|
||||
else
|
||||
val &= ~UCR1_RTSDEN;
|
||||
writel(val, sport->port.membase + UCR1);
|
||||
if (sport->have_rtscts) {
|
||||
val = readl(sport->port.membase + UCR1);
|
||||
if (on)
|
||||
val |= UCR1_RTSDEN;
|
||||
else
|
||||
val &= ~UCR1_RTSDEN;
|
||||
writel(val, sport->port.membase + UCR1);
|
||||
}
|
||||
}
|
||||
|
||||
static int imx_serial_port_suspend_noirq(struct device *dev)
|
||||
|
|
|
|||
Loading…
Reference in a new issue