diff options
author | Jarkko Nikula <jhnikula@gmail.com> | 2011-01-24 10:51:22 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-03 17:10:22 -0500 |
commit | 78841462d72fe7038cb7ea48adecc6fc395f2dc5 (patch) | |
tree | 1722a48da7a6890b6d1c215f5cf6204580d2b459 /drivers/tty/serial/omap-serial.c | |
parent | 364a6ece62455f669336e50d5b00f14ba650da93 (diff) |
serial: omap-serial: Enable the UART wake-up bits always
OMAP can do also dynamic idling so wake-up enable register should be set
also while system is running. If UART_OMAP_WER is not set, then for instance
the RX activity cannot wake up the UART port that is sleeping.
This RX wake-up feature was working when the 8250 driver was used instead
of omap-serial. Reason for this is that the 8250 doesn't set the
UART_OMAP_WER and then arch/arm/mach-omap2/pm34xx.c ends up saving and
restoring the reset default which is the same than value
OMAP_UART_WER_MOD_WKUP here.
Fix this by moving the conditional UART_OMAP_WER write from serial_omap_pm
into serial_omap_startup where wake-up bits are set unconditionally.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty/serial/omap-serial.c')
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 699b34446a55..763537943a53 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
@@ -520,6 +520,9 @@ static int serial_omap_startup(struct uart_port *port) | |||
520 | up->ier = UART_IER_RLSI | UART_IER_RDI; | 520 | up->ier = UART_IER_RLSI | UART_IER_RDI; |
521 | serial_out(up, UART_IER, up->ier); | 521 | serial_out(up, UART_IER, up->ier); |
522 | 522 | ||
523 | /* Enable module level wake up */ | ||
524 | serial_out(up, UART_OMAP_WER, OMAP_UART_WER_MOD_WKUP); | ||
525 | |||
523 | up->port_activity = jiffies; | 526 | up->port_activity = jiffies; |
524 | return 0; | 527 | return 0; |
525 | } | 528 | } |
@@ -827,9 +830,6 @@ serial_omap_pm(struct uart_port *port, unsigned int state, | |||
827 | serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); | 830 | serial_out(up, UART_LCR, UART_LCR_CONF_MODE_B); |
828 | serial_out(up, UART_EFR, efr); | 831 | serial_out(up, UART_EFR, efr); |
829 | serial_out(up, UART_LCR, 0); | 832 | serial_out(up, UART_LCR, 0); |
830 | /* Enable module level wake up */ | ||
831 | serial_out(up, UART_OMAP_WER, | ||
832 | (state != 0) ? OMAP_UART_WER_MOD_WKUP : 0); | ||
833 | } | 833 | } |
834 | 834 | ||
835 | static void serial_omap_release_port(struct uart_port *port) | 835 | static void serial_omap_release_port(struct uart_port *port) |