From: Kevin Hilman <khilman@deeprootsystems.com>
To: Tero Kristo <tero.kristo@nokia.com>
Cc: linux-omap@vger.kernel.org, Peter Tseng <tsenpet09@gmail.com>
Subject: Re: [PATCHv7] OMAP3: Serial: Improved sleep logic
Date: Tue, 11 May 2010 16:15:18 -0700 [thread overview]
Message-ID: <87r5lirpx5.fsf@deeprootsystems.com> (raw)
In-Reply-To: <87vdc14zqc.fsf@deeprootsystems.com> (Kevin Hilman's message of "Thu\, 08 Apr 2010 10\:32\:11 -0700")
Kevin Hilman <khilman@deeprootsystems.com> writes:
> Tero Kristo <tero.kristo@nokia.com> writes:
>
>> From: Tero Kristo <tero.kristo@nokia.com>
>>
>> This patch contains following improvements:
>> - Only RX interrupt will now kick the sleep prevent timer
>> - TX fifo status is checked before disabling clocks, this will prevent
>> on-going transmission to be cut
>> - Smartidle is now enabled/disabled only while switching clocks, as having
>> smartidle enabled while RX/TX prevents any wakeups from being received
>> from UART module
>> - Added workqueue for wakeup checks, as jiffy timer access within the
>> idle loop results into skewed timers as jiffy timers are stopped
>> - Added garbage_timer for ignoring the first character received during
>> the first tick after clock enable, this prevents garbage characters to be
>> received in low sleep states
>> - omap_uart_enable_irqs() changed to use enable_irq / disable_irq instead
>> of request / free. Using request/free changes the behavior after first
>> suspend due to reversed interrupt handler ordering
>
> Hi Tero,
>
> FYI... I had to make one additional change (diff below) to this patch
> after discovering a regression pointed out by Peter Tseng.
>
> If the UART timeouts are disabled (set to zero), which they are by
> default, and you suspend the system, the UART would not be usable
> after wakeup. Simply enabling a timeout was fixing the problem.
>
> I tracked the problem to the garbage timer being enabled even when
> the UART timeout was not enabled. Since the garbage_ignore flag
> is only ever cleared when a uart->timeout is set, the garbage
> timer was never being disabled, effectively disabling the UART.
>
> I've folded this fix below into your patch in the pm-fixes branch
> and pushed a new PM branch.
OK, I'm dropping this patch from the PM branch. It has caused me more
problems that it has solved so far, and I just noticed that
UART2-based consoles (n900, beagle) stop working all together when I
enable UART timeouts with this patch. Seems to be again related to
the garbage timer.
What I would like to see instead is UART hwmods finished and the
omap-serial driver merged so that we can start moving this PM logic
into the omap-serial driver using the runtime PM layer.
Kevin
>
>
> diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
> index b731556..b709cf8 100644
> --- a/arch/arm/mach-omap2/serial.c
> +++ b/arch/arm/mach-omap2/serial.c
> @@ -396,7 +396,8 @@ void omap_uart_prepare_idle(int num)
>
> static void serial_wakeup(struct omap_uart_state *uart)
> {
> - uart->garbage_ignore = 1;
> + if (uart->timeout)
> + uart->garbage_ignore = 1;
> schedule_work(&uart->wakeup_work);
> }
>
> k
prev parent reply other threads:[~2010-05-11 23:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 15:38 [PATCHv7] OMAP3: Serial: Improved sleep logic Tero Kristo
2010-03-15 18:49 ` Kevin Hilman
2010-04-08 17:32 ` Kevin Hilman
2010-05-11 23:15 ` 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=87r5lirpx5.fsf@deeprootsystems.com \
--to=khilman@deeprootsystems.com \
--cc=linux-omap@vger.kernel.org \
--cc=tero.kristo@nokia.com \
--cc=tsenpet09@gmail.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.