Commit 08de1014 authored by Jingchang Lu's avatar Jingchang Lu Committed by Greg Kroah-Hartman

serial: fsl-lpuart: add lpuart32 power management support

This adds 32-bit register lpuart32 power management support,
this also updates the 8-bit register lpuart resume function.
Signed-off-by: default avatarJingchang Lu <jingchang.lu@freescale.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5483c10e
...@@ -1862,6 +1862,20 @@ static int lpuart_suspend(struct device *dev) ...@@ -1862,6 +1862,20 @@ static int lpuart_suspend(struct device *dev)
static int lpuart_resume(struct device *dev) static int lpuart_resume(struct device *dev)
{ {
struct lpuart_port *sport = dev_get_drvdata(dev); struct lpuart_port *sport = dev_get_drvdata(dev);
unsigned long temp;
if (sport->lpuart32) {
lpuart32_setup_watermark(sport);
temp = lpuart32_read(sport->port.membase + UARTCTRL);
temp |= (UARTCTRL_RIE | UARTCTRL_TIE | UARTCTRL_RE |
UARTCTRL_TE | UARTCTRL_ILIE);
lpuart32_write(temp, sport->port.membase + UARTCTRL);
} else {
lpuart_setup_watermark(sport);
temp = readb(sport->port.membase + UARTCR2);
temp |= (UARTCR2_RIE | UARTCR2_TIE | UARTCR2_RE | UARTCR2_TE);
writeb(temp, sport->port.membase + UARTCR2);
}
uart_resume_port(&lpuart_reg, &sport->port); uart_resume_port(&lpuart_reg, &sport->port);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment