On Sat, Apr 4, 2009 at 9:20 AM, Kevin Hilman <khilman@xxxxxxxxxxxxxxxxxxx> wrote: > Kim Kyuwon <chammoru@xxxxxxxxx> writes: > >> Hi Kevin, >> Thanks for your prompt answer. >> >> On Sat, Apr 4, 2009 at 1:12 AM, Kevin Hilman >> <khilman@xxxxxxxxxxxxxxxxxxx> wrote: >>> Kim Kyuwon <chammoru@xxxxxxxxx> 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? No, I haven't configured GPTIMER12. And actually OMAP3430_ST_GPT12_MASK bit is reserved on OMAP3430 ES.1. This is another problem that I have to fix..... >> 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. Thanks! > Kevin > -- Kyuwon -- 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