diff options
author | Govindraj.R <govindraj.raja@ti.com> | 2011-10-18 07:39:10 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-12-14 19:05:26 -0500 |
commit | 08f86b3eab9807e6d36de7e00025abad893ff557 (patch) | |
tree | 6f44b56d6cb9c0b49e0750e18f9465e1d2f5ee9d /arch | |
parent | 8612bd22f30369745d0fda0d540aca39ab591cc5 (diff) |
ARM: OMAP2+: UART: Avoid uart idling on suspend for no_console_suspend usecase
If no_console_suspend is used we have prevent uart idling during suspend
to provide debug prints.
Power domain hooks can idle uarts if left enabled during system wide suspend
so re-use the omap_device_disable_idle_on_suspend API's to ensure console_uart
is not idled during suspend.
omap_device_disable_idle_on_suspend API was used on all uarts since the uart
driver was not runtime adapted, now with runtime adaptation we can re-use this
API only for no_console_suspend use cases.
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/serial.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c index 85516c946ef0..6c8135a9d35d 100644 --- a/arch/arm/mach-omap2/serial.c +++ b/arch/arm/mach-omap2/serial.c | |||
@@ -64,6 +64,7 @@ struct omap_uart_state { | |||
64 | static LIST_HEAD(uart_list); | 64 | static LIST_HEAD(uart_list); |
65 | static u8 num_uarts; | 65 | static u8 num_uarts; |
66 | static u8 console_uart_id = -1; | 66 | static u8 console_uart_id = -1; |
67 | static u8 no_console_suspend; | ||
67 | 68 | ||
68 | #define DEFAULT_RXDMA_POLLRATE 1 /* RX DMA polling rate (us) */ | 69 | #define DEFAULT_RXDMA_POLLRATE 1 /* RX DMA polling rate (us) */ |
69 | #define DEFAULT_RXDMA_BUFSIZE 4096 /* RX DMA buffer size */ | 70 | #define DEFAULT_RXDMA_BUFSIZE 4096 /* RX DMA buffer size */ |
@@ -298,6 +299,10 @@ static int __init omap_serial_early_init(void) | |||
298 | 299 | ||
299 | if (cmdline_find_option(uart_name)) { | 300 | if (cmdline_find_option(uart_name)) { |
300 | console_uart_id = uart->num; | 301 | console_uart_id = uart->num; |
302 | |||
303 | if (cmdline_find_option("no_console_suspend")) | ||
304 | no_console_suspend = true; | ||
305 | |||
301 | /* | 306 | /* |
302 | * omap-uart can be used for earlyprintk logs | 307 | * omap-uart can be used for earlyprintk logs |
303 | * So if omap-uart is used as console then prevent | 308 | * So if omap-uart is used as console then prevent |
@@ -385,7 +390,9 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, | |||
385 | WARN(IS_ERR(pdev), "Could not build omap_device for %s: %s.\n", | 390 | WARN(IS_ERR(pdev), "Could not build omap_device for %s: %s.\n", |
386 | name, oh->name); | 391 | name, oh->name); |
387 | 392 | ||
388 | omap_device_disable_idle_on_suspend(pdev); | 393 | if ((console_uart_id == bdata->id) && no_console_suspend) |
394 | omap_device_disable_idle_on_suspend(pdev); | ||
395 | |||
389 | oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); | 396 | oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); |
390 | 397 | ||
391 | uart->pdev = pdev; | 398 | uart->pdev = pdev; |