public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@ti.com>
To: t-kristo@ti.com
Cc: Alan Stern <stern@rowland.harvard.edu>,
	"Shilimkar, Santosh" <santosh.shilimkar@ti.com>,
	"R, Govindraj" <govindraj.raja@ti.com>,
	"Basak, Partha" <p-basak2@ti.com>, "Balbi, Felipe" <balbi@ti.com>,
	"Munegowda, Keshava" <keshava_mgowda@ti.com>,
	linux-pm@lists.linux-foundation.org, linux-omap@vger.kernel.org
Subject: Re: [linux-pm] Issue: Runtime API usage in wake-up device irq_handler during wakeup from system-wide-suspend.
Date: Thu, 08 Sep 2011 06:51:01 -0700	[thread overview]
Message-ID: <87d3fbm9bu.fsf@ti.com> (raw)
In-Reply-To: <1315457911.2679.19.camel@sokoban> (Tero Kristo's message of "Thu, 8 Sep 2011 07:58:31 +0300")

Hi Tero,

Tero Kristo <t-kristo@ti.com> writes:

> On Wed, 2011-09-07 at 19:59 +0200, Hilman, Kevin wrote:
>> Tero Kristo <t-kristo@ti.com> writes:

[...]

>> > After thinking about this problem and looking at possible ways to fix
>> > it, I am planning to change the PRCM chain handler to be a driver, which
>> > gets suspended along with the rest of the system. This means the PRCM
>> > interrupt would get disabled also during this time, and it would be
>> > enabled in the driver->complete() call, which should happen after rest
>> > of the drivers have been able to enable their PM runtime in the
>> > driver->resume() call chain. Do you see any problems with this approach?
>> 
>> How will the system wakeup from retention or off-mode if the PRCM IRQ is
>> disabled?
>
> This is actually some sort of an issue with retention if we disable PRCM
> irq completely, off works purely with wakeup signals as we come out of
> reset. Anyway, I did some experimentation with this, and OMAP3 is able
> to wake up if we leave WKUP irq up, but disable IO chain irq. IO chain
> events seem to trigger a WKUP event also always, we just postpone the
> processing of IO chain until later. I had to also split the wakeup
> clearing for OMAP3 into 2 parts, one part handles wakeups and another IO
> chain. Currently both IO chain and WKUP are acked by the same handler.

Here's another option, which is kind of a hybrid of what's been
discussed so far.

The PRCM driver would leave the IRQs enabled during suspend, but would
just delay delivering them to the drivers.  IOW, handle/clear the PRCM
IRQ normally, but delay delivery of the *device* IRQ until the
->complete callback of the PRCM driver.

Doing this ensures all the drivers are resumed before any device IRQ is
delivered, and doesn't require any additional queuing of events in the
drivers.

Kevin

  reply	other threads:[~2011-09-08 13:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-26 13:01 Issue: Runtime API usage in wake-up device irq_handler during wakeup from system-wide-suspend Govindraj.R
2011-08-26 18:36 ` [linux-pm] " Alan Stern
2011-08-27  6:30   ` Santosh
2011-08-27 14:01     ` Alan Stern
2011-08-27 14:49       ` Santosh
2011-08-27 19:42         ` Alan Stern
2011-09-07 15:48           ` Tero Kristo
2011-09-07 17:59             ` Kevin Hilman
2011-09-08  4:58               ` Tero Kristo
2011-09-08 13:51                 ` Kevin Hilman [this message]
2011-08-26 20:52 ` Rafael J. Wysocki

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=87d3fbm9bu.fsf@ti.com \
    --to=khilman@ti.com \
    --cc=balbi@ti.com \
    --cc=govindraj.raja@ti.com \
    --cc=keshava_mgowda@ti.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=p-basak2@ti.com \
    --cc=santosh.shilimkar@ti.com \
    --cc=stern@rowland.harvard.edu \
    --cc=t-kristo@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox