linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v7 20/21] OMAP2+: UART: Avoid uart idling on suspend for no_console_suspend usecase
@ 2011-10-18 15:35 Govindraj.R
  2011-10-18 15:35 ` [PATCH v7 21/21] OMAP2+: UART: Do not gate uart clocks if used for debug_prints Govindraj.R
  0 siblings, 1 reply; 9+ messages in thread
From: Govindraj.R @ 2011-10-18 15:35 UTC (permalink / raw)
  To: linux-arm-kernel

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>
---
 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 55903f0..5e3bbce 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -64,6 +64,7 @@ struct omap_uart_state {
 static LIST_HEAD(uart_list);
 static u8 num_uarts;
 static u8 console_uart_id = -1;
+static u8 no_console_suspend;
 
 #define DEFAULT_RXDMA_POLLRATE		1	/* RX DMA polling rate (us) */
 #define DEFAULT_RXDMA_BUFSIZE		4096	/* RX DMA buffer size */
@@ -308,6 +309,10 @@ static int __init omap_serial_early_init(void)
 
 		if (cmdline_find_option(uart_name)) {
 			console_uart_id = uart->num;
+
+			if (cmdline_find_option("no_console_suspend"))
+				no_console_suspend = true;
+
 			/*
 			 * omap-uart can be used for earlyprintk logs
 			 * So if omap-uart is used as console then prevent
@@ -400,7 +405,9 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
 		od->pm_lats = console_uart_latency;
 	}
 
-	omap_device_disable_idle_on_suspend(pdev);
+	if (no_console_suspend)
+		omap_device_disable_idle_on_suspend(pdev);
+
 	oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
 
 	uart->pdev = pdev;
-- 
1.7.4.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2011-10-20  9:47 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-18 15:35 [PATCH v7 20/21] OMAP2+: UART: Avoid uart idling on suspend for no_console_suspend usecase Govindraj.R
2011-10-18 15:35 ` [PATCH v7 21/21] OMAP2+: UART: Do not gate uart clocks if used for debug_prints Govindraj.R
2011-10-19  5:35   ` Mohammed, Afzal
2011-10-19 12:52     ` Govindraj
2011-10-19 14:20       ` Mohammed, Afzal
2011-10-20  8:39         ` Govindraj
2011-10-20  9:28           ` Mohammed, Afzal
2011-10-20  9:47             ` Govindraj
2011-10-19  6:51   ` Mohammed, Afzal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).