All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] OMAP3: PM: ensure IO wakeups are properly disabled
@ 2010-08-10 23:53 Kevin Hilman
  2010-08-11  5:39 ` Jarkko Nikula
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Hilman @ 2010-08-10 23:53 UTC (permalink / raw)
  To: linux-omap; +Cc: Ameya Palande

From: Kevin Hilman <khilman@ti.com>

During idle, if the PER powerdomain transitions and CORE does not (as
is the case with the lower C-states when using CPUidle) the IO pad
wakeups are not being disabled in the idle path after they are
enabled.

This patch ensures that the check for disabling IO wakeups also checks
for PER transitions, matching the check done to enable IO wakeups.

Found when debugging PM/CPUidle related problems reported by Ameya
Palande <ameya.palande@nokia.com>.  Problems were triggered
particularily on boards with UART2 consoles (n900, Overo) since UART2
is in the PER powerdomain.

Tested on l-o master (omap3_defonfig + CONFIG_CPU_IDLE=y) as well
as with current PM branch.  Boards tested: n900, Overo, omap3evm.

Cc: Ameya Palande <ameya.palande@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
---
This should go into 2.6.36-rc2 as it's a fix for a serious regression.

 arch/arm/mach-omap2/pm34xx.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index fb4994a..7b03426 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -480,7 +480,9 @@ void omap_sram_idle(void)
 	}
 
 	/* Disable IO-PAD and IO-CHAIN wakeup */
-	if (omap3_has_io_wakeup() && core_next_state < PWRDM_POWER_ON) {
+	if (omap3_has_io_wakeup() &&
+	    (per_next_state < PWRDM_POWER_ON ||
+	     core_next_state < PWRDM_POWER_ON)) {
 		prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
 		omap3_disable_io_chain();
 	}
-- 
1.7.2.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] OMAP3: PM: ensure IO wakeups are properly disabled
  2010-08-10 23:53 [PATCH] OMAP3: PM: ensure IO wakeups are properly disabled Kevin Hilman
@ 2010-08-11  5:39 ` Jarkko Nikula
  0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Nikula @ 2010-08-11  5:39 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap, Ameya Palande

On Tue, 10 Aug 2010 16:53:51 -0700
Kevin Hilman <khilman@deeprootsystems.com> wrote:

> From: Kevin Hilman <khilman@ti.com>
> 
> During idle, if the PER powerdomain transitions and CORE does not (as
> is the case with the lower C-states when using CPUidle) the IO pad
> wakeups are not being disabled in the idle path after they are
> enabled.
> 
> This patch ensures that the check for disabling IO wakeups also checks
> for PER transitions, matching the check done to enable IO wakeups.
> 
> Found when debugging PM/CPUidle related problems reported by Ameya
> Palande <ameya.palande@nokia.com>.  Problems were triggered
> particularily on boards with UART2 consoles (n900, Overo) since UART2
> is in the PER powerdomain.
> 
> Tested on l-o master (omap3_defonfig + CONFIG_CPU_IDLE=y) as well
> as with current PM branch.  Boards tested: n900, Overo, omap3evm.
> 
> Cc: Ameya Palande <ameya.palande@nokia.com>
> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
> ---

I don't see the problem on N900 anymore after applying this patch. Feel
free to add:

Tested-by: Jarkko Nikula <jhnikula@gmail.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-11  5:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-10 23:53 [PATCH] OMAP3: PM: ensure IO wakeups are properly disabled Kevin Hilman
2010-08-11  5:39 ` Jarkko Nikula

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.