public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] ARM:OMAP3: Smartreflex disable/enable fix
@ 2008-08-29 10:05 Kalle Jokiniemi
  2008-08-29 10:47 ` Russell King - ARM Linux
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Jokiniemi @ 2008-08-29 10:05 UTC (permalink / raw)
  To: linux-omap; +Cc: Kalle Jokiniemi

Smartreflex modules have to be disabled when device enters WFI.
Previously only suspend idle path had these calls. By moving the
disable/enable calls to omap_sram_idle, all idle paths will be covered.

Signed-off-by: Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com>
---
 arch/arm/mach-omap2/pm34xx.c |   15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index a16eb33..e2d1119 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -166,12 +166,19 @@ static void omap_sram_idle(void)
 		printk(KERN_ERR "Invalid mpu state in sram_idle\n");
 		return;
 	}
+	/* Disable smartreflex before entering WFI */
+	disable_smartreflex(SR1);
+	disable_smartreflex(SR2);
 
 	omap2_gpio_prepare_for_retention();
 
 	_omap_sram_idle(NULL, save_state);
 
 	omap2_gpio_resume_after_retention();
+
+	/* Enable smartreflex after WFI */
+	enable_smartreflex(SR1);
+	enable_smartreflex(SR2);
 }
 
 /*
@@ -297,10 +304,6 @@ static int omap3_pm_suspend(void)
 	struct power_state *pwrst;
 	int state, ret = 0;
 
-	/* XXX Disable smartreflex before entering suspend */
-	disable_smartreflex(SR1);
-	disable_smartreflex(SR2);
-
 	/* Read current next_pwrsts */
 	list_for_each_entry(pwrst, &pwrst_list, node)
 		pwrst->saved_state = pwrdm_read_next_pwrst(pwrst->pwrdm);
@@ -332,10 +335,6 @@ restore:
 		printk(KERN_INFO "Successfully put all powerdomains "
 		       "to target state\n");
 
-	/* XXX Enable smartreflex after suspend */
-	enable_smartreflex(SR1);
-	enable_smartreflex(SR2);
-
 	return ret;
 }
 
-- 
1.5.4.3


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

* Re: [PATCH 1/1] ARM:OMAP3: Smartreflex disable/enable fix
  2008-08-29 10:05 [PATCH 1/1] ARM:OMAP3: Smartreflex disable/enable fix Kalle Jokiniemi
@ 2008-08-29 10:47 ` Russell King - ARM Linux
  2008-08-29 11:55   ` Kalle Jokiniemi
  0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2008-08-29 10:47 UTC (permalink / raw)
  To: Kalle Jokiniemi; +Cc: linux-omap

On Fri, Aug 29, 2008 at 01:05:44PM +0300, Kalle Jokiniemi wrote:
> Smartreflex modules have to be disabled when device enters WFI.
> Previously only suspend idle path had these calls. By moving the
> disable/enable calls to omap_sram_idle, all idle paths will be covered.

Won't deleting the calls from the suspend path break suspend/resume?

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

* Re: [PATCH 1/1] ARM:OMAP3: Smartreflex disable/enable fix
  2008-08-29 10:47 ` Russell King - ARM Linux
@ 2008-08-29 11:55   ` Kalle Jokiniemi
  2008-09-10 17:55     ` Tony Lindgren
  0 siblings, 1 reply; 4+ messages in thread
From: Kalle Jokiniemi @ 2008-08-29 11:55 UTC (permalink / raw)
  To: ext Russell King - ARM Linux; +Cc: linux-omap

On pe, 2008-08-29 at 11:47 +0100, ext Russell King - ARM Linux wrote:
> On Fri, Aug 29, 2008 at 01:05:44PM +0300, Kalle Jokiniemi wrote:
> > Smartreflex modules have to be disabled when device enters WFI.
> > Previously only suspend idle path had these calls. By moving the
> > disable/enable calls to omap_sram_idle, all idle paths will be covered.
> 
> Won't deleting the calls from the suspend path break suspend/resume?

No, since omap3_pm_suspend calls omap_sram_idle. The disabling is just
moves one step later. Also omap3_pm_idle and the idle loop in cpu idle
call omap_sram_idle, so they get covered as well.

regards,
Kalle

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

* Re: [PATCH 1/1] ARM:OMAP3: Smartreflex disable/enable fix
  2008-08-29 11:55   ` Kalle Jokiniemi
@ 2008-09-10 17:55     ` Tony Lindgren
  0 siblings, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2008-09-10 17:55 UTC (permalink / raw)
  To: Kalle Jokiniemi; +Cc: ext Russell King - ARM Linux, linux-omap

* Kalle Jokiniemi <ext-kalle.jokiniemi@nokia.com> [080829 04:54]:
> On pe, 2008-08-29 at 11:47 +0100, ext Russell King - ARM Linux wrote:
> > On Fri, Aug 29, 2008 at 01:05:44PM +0300, Kalle Jokiniemi wrote:
> > > Smartreflex modules have to be disabled when device enters WFI.
> > > Previously only suspend idle path had these calls. By moving the
> > > disable/enable calls to omap_sram_idle, all idle paths will be covered.
> > 
> > Won't deleting the calls from the suspend path break suspend/resume?
> 
> No, since omap3_pm_suspend calls omap_sram_idle. The disabling is just
> moves one step later. Also omap3_pm_idle and the idle loop in cpu idle
> call omap_sram_idle, so they get covered as well.

Pushing today.

Tony

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

end of thread, other threads:[~2008-09-10 17:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-29 10:05 [PATCH 1/1] ARM:OMAP3: Smartreflex disable/enable fix Kalle Jokiniemi
2008-08-29 10:47 ` Russell King - ARM Linux
2008-08-29 11:55   ` Kalle Jokiniemi
2008-09-10 17:55     ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox