From: Kevin Hilman <khilman@deeprootsystems.com>
To: "Reddy, Teerth" <teerth@ti.com>
Cc: "linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: [PATCH 1/3] OMAP3:PM: Keep UART clocks disabled is resume idle path
Date: Tue, 29 Jun 2010 08:10:44 -0700 [thread overview]
Message-ID: <87zkydub63.fsf@deeprootsystems.com> (raw)
In-Reply-To: <5A47E75E594F054BAF48C5E4FC4B92AB0323763481@dbde02.ent.ti.com> (Teerth Reddy's message of "Tue, 29 Jun 2010 12:28:56 +0530")
"Reddy, Teerth" <teerth@ti.com> writes:
> From: Teerth Reddy <teerth@ti.com>
>
> 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@ti.com>
> Signed-off-by: Teerth Reddy <teerth@ti.com>
>
> ---
> 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)
prev parent reply other threads:[~2010-06-29 15:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-29 6:58 [PATCH 1/3] OMAP3:PM: Keep UART clocks disabled is resume idle path Reddy, Teerth
2010-06-29 15:10 ` Kevin Hilman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zkydub63.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=teerth@ti.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.