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>

+9 -2
+9 -2
arch/arm/mach-omap2/serial.c
··· 36 36 #define UART_OMAP_NO_EMPTY_FIFO_READ_IP_REV 0x52 37 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 47 struct omap_uart_state { 42 48 int num; ··· 428 422 uart->timeout = DEFAULT_TIMEOUT; 429 423 setup_timer(&uart->timer, omap_uart_idle_timer, 430 424 (unsigned long) uart); 431 - mod_timer(&uart->timer, jiffies + uart->timeout); 425 + if (uart->timeout) 426 + mod_timer(&uart->timer, jiffies + uart->timeout); 432 427 omap_uart_smart_idle_enable(uart, 0); 433 428 434 429 if (cpu_is_omap34xx()) {