public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@deeprootsystems.com>
To: Kim Kyuwon <chammoru@gmail.com>
Cc: OMAP <linux-omap@vger.kernel.org>,
	"Tony Lindgren" <tony@atomide.com>,
	박경민 <kyungmin.park@samsung.com>
Subject: Re: [PATCH] OMAP3: PM: Add the wakeup source driver, v2
Date: Fri, 03 Apr 2009 17:20:43 -0700	[thread overview]
Message-ID: <877i21w9pg.fsf@deeprootsystems.com> (raw)
In-Reply-To: <4d34a0a70904031647n6ae7c175w96b1610bf553ebda@mail.gmail.com> (Kim Kyuwon's message of "Sat\, 4 Apr 2009 08\:47\:20 +0900")

Kim Kyuwon <chammoru@gmail.com> writes:

> Hi Kevin,
> Thanks for your prompt answer.
>
> On Sat, Apr 4, 2009 at 1:12 AM, Kevin Hilman
> <khilman@deeprootsystems.com> wrote:
>> Kim Kyuwon <chammoru@gmail.com> writes:
>>
>>>>> +
>>>>> +void omap3_get_wakeup_status(struct pm_wakeup_status **pm_wkst)
>>>>> +{
>>>>> +     *pm_wkst = &omap3_pm_wkst;
>>>>> +}
>>>>> +
>>>>
>>>> Can you rename this to omap3_get_last_wake_state()
>>>
>>> Actually, I removed this function and I didn't get the WKST registers
>>> from the last PRCM interrupt in the new patch. Sorry that I don't
>>> address your suggestion. But I found that the PRCM interrupt is being
>>> generated in normal state on the latest PM branch and, from OMAP34XX
>>> TRM (4.9 PRCM Interrupts), PRCM Interrupts can be generated in many
>>> cases in addition to wake-up from suspend. So if my wakeup code gets
>>> the WSKT values from PRCM interrupt, I think it could show the wrong
>>> information.
>>>
>>
>> What type of wrong information do you think you would get?
>
> On our custom OMAP3430 ES3.1 board on which the latest PM branch
> kernel is running, the PRCM interrupt is being generated about every
> 0.5 sec.(not exact) and 'OMAP3430_ST_GPT12_MASK' is set in the
> PM_WKST_WKUP register.

Hmm, have you configured GPTIMER12 as the system timer?

> FYI: When I wrongly configured the d2d_mstdby and d2d_swakeup pads,
> PRCM interrupts was also generated (Refer to
> http://markmail.org/thread/juardvjdvsrrqwuj)
>
>> After looking again, you are probably querying the WKST registers
>> too late.  This version was not querying until someone dumped
>> the sysfs regs.  In that case, some other idle event could have
>> changed the WKST regs.
>>
>> What you should do is query the WKST regs in your early_resume hook
>> (the same place you query the pending IRQs.)  This way you know
>> exactly when the WKST regs are taken.
>
> However, my 'early_resume' hook is invoked before generating any
> interrupt including PRCM interrupts, because IRQs are disabled by
> arch_suspend_disablel_irqs() in that context.

Ah, yes.  You're right.

> But if I query the WKST regs in the 'resume' hook, I think another
> PRCM interrupts can be generated.

OK, I haven't yet looked closely at your latest version, but reading
the regs directly in the early_resume hook looks OK.

Kevin
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-04-04  0:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-19  4:25 [PATCH] OMAP3: PM: Add the wakeup source driver, v2 Kim Kyuwon
2009-03-31  2:48 ` Kim Kyuwon
2009-04-01  0:09 ` Kevin Hilman
2009-04-03 10:20   ` Kim Kyuwon
2009-04-03 16:12     ` Kevin Hilman
2009-04-03 23:47       ` Kim Kyuwon
2009-04-04  0:20         ` Kevin Hilman [this message]
2009-04-04  0:26           ` Kim Kyuwon
2009-04-04 20:22             ` Paul Walmsley
2009-04-06  2:30               ` Kim Kyuwon

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=877i21w9pg.fsf@deeprootsystems.com \
    --to=khilman@deeprootsystems.com \
    --cc=chammoru@gmail.com \
    --cc=kyungmin.park@samsung.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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