diff options
author | Tony Lindgren <tony@atomide.com> | 2010-02-01 15:34:31 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-02-03 11:48:06 -0500 |
commit | 301fe8eeee02c570c5bd30537aff9456f7f7955c (patch) | |
tree | 61f64993b3234f3532a003f6bf8835f2263377c8 /arch/arm/mach-omap2/serial.c | |
parent | 0825cc8a6ffa54c87ad7ad914a16d6c035627935 (diff) |
omap: Disable serial port autoidle by default
Currently the omap serial clocks are autoidled after 5 seconds.
However, this causes lost characters on the serial ports. As this
is considered non-standard behaviour for Linux, disable the timeout.
Note that this will also cause blocking of any deeper omap sleep
states.
To enable the autoidling of the serial ports, do something like
this for each serial port:
# echo 5 > /sys/devices/platform/serial8250.0/sleep_timeout
# echo 5 > /sys/devices/platform/serial8250.1/sleep_timeout
...
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/serial.c')
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 8c964bec8159..e10a02df6e1d 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -36,7 +36,13 @@ | |||
36 | #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 | 36 | #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 |
37 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ | 37 | #define UART_OMAP_WER 0x17 /* Wake-up enable register */ |
38 | 38 | ||
39 | #define DEFAULT_TIMEOUT (5 * HZ) | 39 | /* |
40 | * NOTE: By default the serial timeout is disabled as it causes lost characters | ||
41 | * over the serial ports. This means that the UART clocks will stay on until | ||
42 | * disabled via sysfs. This also causes that any deeper omap sleep states are | ||
43 | * blocked. | ||
44 | */ | ||
45 | #define DEFAULT_TIMEOUT 0 | ||
40 | 46 | ||
41 | struct omap_uart_state { | 47 | struct omap_uart_state { |
42 | int num; | 48 | int num; |
@@ -422,7 +428,8 @@ static void omap_uart_idle_init(struct omap_uart_state *uart) | |||
422 | uart->timeout = DEFAULT_TIMEOUT; | 428 | uart->timeout = DEFAULT_TIMEOUT; |
423 | setup_timer(&uart->timer, omap_uart_idle_timer, | 429 | setup_timer(&uart->timer, omap_uart_idle_timer, |
424 | (unsigned long) uart); | 430 | (unsigned long) uart); |
425 | mod_timer(&uart->timer, jiffies + uart->timeout); | 431 | if (uart->timeout) |
432 | mod_timer(&uart->timer, jiffies + uart->timeout); | ||
426 | omap_uart_smart_idle_enable(uart, 0); | 433 | omap_uart_smart_idle_enable(uart, 0); |
427 | 434 | ||
428 | if (cpu_is_omap34xx()) { | 435 | if (cpu_is_omap34xx()) { |