Re: [PATCH 1/3] OMAP3:PM: Keep UART clocks disabled is resume idle path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Reddy, Teerth" <teerth@xxxxxx> writes:

> From: Teerth Reddy <teerth@xxxxxx>
>
> The UART clocks should not be turned on in resume idle path. The UART clocks
> should be turned on only when there is a uart wakeup event. 

No, UART clocks should be on whenever someone is accessing the UART.

Besides wakeups, applications can open/access UARTs whenever they want.
With this patch, an application wil fault if it tries to open a UART as
the 8250 driver will access registers and not know how to turn on clocks.

After the UART hwmod conversion done and the omap-serial driver is
merged, we will convert the omap-serial driver to use runtime PM which
will then be much more efficient in power as the driver is the only
place that knows when the device needs to be enabled.

Kevin

> This optimization
> will help save power.
>
> Signed-off-by: Raja Govindraj <govindraj.raja@xxxxxx>
> Signed-off-by: Teerth Reddy <teerth@xxxxxx>
>
> ---
>  arch/arm/mach-omap2/serial.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index 3771254..d545eed 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -343,6 +343,7 @@ static void omap_uart_idle_timer(unsigned long data)
>  {
>  	struct omap_uart_state *uart = (struct omap_uart_state *)data;
>  
> +	uart->timeout = DEFAULT_TIMEOUT;
>  	omap_uart_allow_sleep(uart);
>  }
>  
> @@ -364,7 +365,6 @@ void omap_uart_resume_idle(int num)
>  
>  	list_for_each_entry(uart, &uart_list, node) {
>  		if (num == uart->num) {
> -			omap_uart_enable_clocks(uart);
>  
>  			/* Check for IO pad wakeup */
>  			if (cpu_is_omap34xx() && uart->padconf) {
> @@ -436,7 +436,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
>  	int ret;
>  
>  	uart->can_sleep = 0;
> -	uart->timeout = DEFAULT_TIMEOUT;
> +	uart->timeout = 30 * HZ;
>  	setup_timer(&uart->timer, omap_uart_idle_timer,
>  		    (unsigned long) uart);
>  	if (uart->timeout)
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux