diff options
author | Philippe Langlais <philippe.langlais@stericsson.com> | 2011-10-18 13:25:14 +0200 |
---|---|---|
committer | Philippe Langlais <philippe.langlais@stericsson.com> | 2011-12-06 10:50:32 +0100 |
commit | 46d714a9e2cd7c4cdce337d50d6c8dbdb9ac8b59 (patch) | |
tree | e6eb6c40cb0b4aa03c9f8e592a491a35288f7f4e /drivers/tty/serial | |
parent | 6c1437fc4716c56134e7a77d62c6471f4c6f1362 (diff) |
pl011: migrate pl011 changes from 2.3v3.2
Ref:
ARM: ux500: uart: context save/restore uses relaxed
pl011: add ifdef
pl011: don't touch registers when clock is off
ux500: pl011: Workaround for UART registers lockup
Migrated Changes from: e1f512c, 852b78d, c2195fa, ac87c0e
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/amba-pl011.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index ff4761e482c..73bd1bc59df 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -1236,7 +1236,7 @@ static irqreturn_t pl011_int(int irq, void *dev_id) do { writew(status & ~(UART011_TXIS|UART011_RTIS| UART011_RXIS), - uap->port.membase + UART011_ICR); + uap->port.membase + UART011_ICR); if (status & (UART011_RTIS|UART011_RXIS)) { if (pl011_dma_rx_running(uap)) @@ -1723,8 +1723,6 @@ static struct uart_ops amba_pl011_pops = { #endif }; -static struct uart_amba_port *amba_ports[UART_NR]; - #ifdef CONFIG_SERIAL_AMBA_PL011_CONSOLE static void pl011_console_putchar(struct uart_port *port, int ch) @@ -1961,7 +1959,12 @@ static int pl011_suspend(struct amba_device *dev, pm_message_t state) if (!uap) return -EINVAL; +#ifdef CONFIG_SERIAL_AMBA_PL011_CLOCK_CONTROL + cancel_delayed_work_sync(&uap->clk_off_work); + if (uap->clk_state == PL011_CLK_OFF) + return 0; +#endif return uart_suspend_port(&amba_reg, &uap->port); } @@ -1971,6 +1974,10 @@ static int pl011_resume(struct amba_device *dev) if (!uap) return -EINVAL; +#ifdef CONFIG_SERIAL_AMBA_PL011_CLOCK_CONTROL + if (uap->clk_state == PL011_CLK_OFF) + return 0; +#endif return uart_resume_port(&amba_reg, &uap->port); } |