|
@@ -1310,8 +1310,17 @@ static void omap8250_complete(struct device *dev)
|
|
|
static int omap8250_suspend(struct device *dev)
|
|
|
{
|
|
|
struct omap8250_priv *priv = dev_get_drvdata(dev);
|
|
|
+ struct uart_8250_port *up = serial8250_get_port(priv->line);
|
|
|
|
|
|
serial8250_suspend_port(priv->line);
|
|
|
+
|
|
|
+ pm_runtime_get_sync(dev);
|
|
|
+ if (!device_may_wakeup(dev))
|
|
|
+ priv->wer = 0;
|
|
|
+ serial_out(up, UART_OMAP_WER, priv->wer);
|
|
|
+ pm_runtime_mark_last_busy(dev);
|
|
|
+ pm_runtime_put_autosuspend(dev);
|
|
|
+
|
|
|
flush_work(&priv->qos_work);
|
|
|
return 0;
|
|
|
}
|
|
@@ -1403,6 +1412,8 @@ static int omap8250_runtime_suspend(struct device *dev)
|
|
|
|
|
|
/* Restore to UART mode after reset (for wakeup) */
|
|
|
omap8250_update_mdr1(up, priv);
|
|
|
+ /* Restore wakeup enable register */
|
|
|
+ serial_out(up, UART_OMAP_WER, priv->wer);
|
|
|
}
|
|
|
|
|
|
if (up->dma && up->dma->rxchan)
|