linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* ARM: OMAP2xxx: PM: remove obsolete timer disable code in the suspend path
@ 2012-02-10  3:08 Paul Walmsley
  2012-02-10  8:42 ` Paul Walmsley
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Walmsley @ 2012-02-10  3:08 UTC (permalink / raw)
  To: linux-arm-kernel


Remove omap_{read,write}l() from the 24xx PM code.  The clocksource
code should now handle what this was supposed to do.

Tested on N800 -- but it's hard to say whether this fixes anything.
OMAP24xx static suspend path is currently broken, and this patch
doesn't change that.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rob Herring <robherring2@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/pm24xx.c |   24 ++----------------------
 1 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index b8822f8..7690b53 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -245,7 +245,7 @@ static void omap2_pm_idle(void)
 	if (omap_irq_pending())
 		goto out;
 
-	omap2_enter_full_retention();
+	omap2_enter_mpu_retention();
 
 out:
 	local_fiq_enable();
@@ -260,26 +260,6 @@ static int omap2_pm_begin(suspend_state_t state)
 	return 0;
 }
 
-static int omap2_pm_suspend(void)
-{
-	u32 wken_wkup, mir1;
-
-	wken_wkup = omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
-	wken_wkup &= ~OMAP24XX_EN_GPT1_MASK;
-	omap2_prm_write_mod_reg(wken_wkup, WKUP_MOD, PM_WKEN);
-
-	/* Mask GPT1 */
-	mir1 = omap_readl(0x480fe0a4);
-	omap_writel(1 << 5, 0x480fe0ac);
-
-	omap2_enter_full_retention();
-
-	omap_writel(mir1, 0x480fe0a4);
-	omap2_prm_write_mod_reg(wken_wkup, WKUP_MOD, PM_WKEN);
-
-	return 0;
-}
-
 static int omap2_pm_enter(suspend_state_t state)
 {
 	int ret = 0;
@@ -287,7 +267,7 @@ static int omap2_pm_enter(suspend_state_t state)
 	switch (state) {
 	case PM_SUSPEND_STANDBY:
 	case PM_SUSPEND_MEM:
-		ret = omap2_pm_suspend();
+		omap2_enter_full_retention();
 		break;
 	default:
 		ret = -EINVAL;
-- 
1.7.9

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

* ARM: OMAP2xxx: PM: remove obsolete timer disable code in the suspend path
  2012-02-10  3:08 ARM: OMAP2xxx: PM: remove obsolete timer disable code in the suspend path Paul Walmsley
@ 2012-02-10  8:42 ` Paul Walmsley
  2012-02-10 19:26   ` Kevin Hilman
  2012-02-20 22:08   ` Tony Lindgren
  0 siblings, 2 replies; 4+ messages in thread
From: Paul Walmsley @ 2012-02-10  8:42 UTC (permalink / raw)
  To: linux-arm-kernel

On Thu, 9 Feb 2012, Paul Walmsley wrote:

> 
> Remove omap_{read,write}l() from the 24xx PM code.  The clocksource
> code should now handle what this was supposed to do.
> 
> Tested on N800 -- but it's hard to say whether this fixes anything.
> OMAP24xx static suspend path is currently broken, and this patch
> doesn't change that.
> 
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Rob Herring <robherring2@gmail.com>
> Cc: Tony Lindgren <tony@atomide.com>

Just realized that a stray change made it into the patch that was posted.
Below is a version with the stray change removed.  It applies on 
Tony's v3.3-rc3 testing branch, plus the OMAP2420 serial fix patch that 
was posted earlier.


- Paul

From: Paul Walmsley <paul@pwsan.com>
Date: Fri, 10 Feb 2012 01:40:04 -0700
Subject: [PATCH v2] ARM: OMAP2xxx: PM: remove obsolete timer disable code 
in the suspend path

Remove omap_{read,write}l() from the 24xx PM code.  The clocksource
code should now handle what this was supposed to do.

Tested on N800 -- but it's hard to say whether this fixes anything.
OMAP24xx static suspend path is currently broken, and this patch
doesn't change that.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Kevin Hilman <khilman@ti.com>
Cc: Rob Herring <robherring2@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/pm24xx.c |   22 +---------------------
 1 files changed, 1 insertions(+), 21 deletions(-)

diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
index 23de98d..18eda53 100644
--- a/arch/arm/mach-omap2/pm24xx.c
+++ b/arch/arm/mach-omap2/pm24xx.c
@@ -254,26 +254,6 @@ static int omap2_pm_begin(suspend_state_t state)
 	return 0;
 }
 
-static int omap2_pm_suspend(void)
-{
-	u32 wken_wkup, mir1;
-
-	wken_wkup = omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
-	wken_wkup &= ~OMAP24XX_EN_GPT1_MASK;
-	omap2_prm_write_mod_reg(wken_wkup, WKUP_MOD, PM_WKEN);
-
-	/* Mask GPT1 */
-	mir1 = omap_readl(0x480fe0a4);
-	omap_writel(1 << 5, 0x480fe0ac);
-
-	omap2_enter_full_retention();
-
-	omap_writel(mir1, 0x480fe0a4);
-	omap2_prm_write_mod_reg(wken_wkup, WKUP_MOD, PM_WKEN);
-
-	return 0;
-}
-
 static int omap2_pm_enter(suspend_state_t state)
 {
 	int ret = 0;
@@ -281,7 +261,7 @@ static int omap2_pm_enter(suspend_state_t state)
 	switch (state) {
 	case PM_SUSPEND_STANDBY:
 	case PM_SUSPEND_MEM:
-		ret = omap2_pm_suspend();
+		omap2_enter_full_retention();
 		break;
 	default:
 		ret = -EINVAL;
-- 
1.7.9

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

* ARM: OMAP2xxx: PM: remove obsolete timer disable code in the suspend path
  2012-02-10  8:42 ` Paul Walmsley
@ 2012-02-10 19:26   ` Kevin Hilman
  2012-02-20 22:08   ` Tony Lindgren
  1 sibling, 0 replies; 4+ messages in thread
From: Kevin Hilman @ 2012-02-10 19:26 UTC (permalink / raw)
  To: linux-arm-kernel

Paul Walmsley <paul@pwsan.com> writes:

> On Thu, 9 Feb 2012, Paul Walmsley wrote:
>
>> 
>> Remove omap_{read,write}l() from the 24xx PM code.  The clocksource
>> code should now handle what this was supposed to do.
>> 
>> Tested on N800 -- but it's hard to say whether this fixes anything.
>> OMAP24xx static suspend path is currently broken, and this patch
>> doesn't change that.
>> 
>> Signed-off-by: Paul Walmsley <paul@pwsan.com>
>> Cc: Kevin Hilman <khilman@ti.com>
>> Cc: Rob Herring <robherring2@gmail.com>
>> Cc: Tony Lindgren <tony@atomide.com>
>
> Just realized that a stray change made it into the patch that was posted.
> Below is a version with the stray change removed.  It applies on 
> Tony's v3.3-rc3 testing branch, plus the OMAP2420 serial fix patch that 
> was posted earlier.
>
>
> - Paul
>
> From: Paul Walmsley <paul@pwsan.com>
> Date: Fri, 10 Feb 2012 01:40:04 -0700
> Subject: [PATCH v2] ARM: OMAP2xxx: PM: remove obsolete timer disable code 
> in the suspend path
>
> Remove omap_{read,write}l() from the 24xx PM code.  The clocksource
> code should now handle what this was supposed to do.
>
> Tested on N800 -- but it's hard to say whether this fixes anything.
> OMAP24xx static suspend path is currently broken, and this patch
> doesn't change that.
>
> Signed-off-by: Paul Walmsley <paul@pwsan.com>
> Cc: Kevin Hilman <khilman@ti.com>
> Cc: Rob Herring <robherring2@gmail.com>
> Cc: Tony Lindgren <tony@atomide.com>

Acked-by: Kevin Hilman <khilman@ti.com>

> ---
>  arch/arm/mach-omap2/pm24xx.c |   22 +---------------------
>  1 files changed, 1 insertions(+), 21 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c
> index 23de98d..18eda53 100644
> --- a/arch/arm/mach-omap2/pm24xx.c
> +++ b/arch/arm/mach-omap2/pm24xx.c
> @@ -254,26 +254,6 @@ static int omap2_pm_begin(suspend_state_t state)
>  	return 0;
>  }
>  
> -static int omap2_pm_suspend(void)
> -{
> -	u32 wken_wkup, mir1;
> -
> -	wken_wkup = omap2_prm_read_mod_reg(WKUP_MOD, PM_WKEN);
> -	wken_wkup &= ~OMAP24XX_EN_GPT1_MASK;
> -	omap2_prm_write_mod_reg(wken_wkup, WKUP_MOD, PM_WKEN);
> -
> -	/* Mask GPT1 */
> -	mir1 = omap_readl(0x480fe0a4);
> -	omap_writel(1 << 5, 0x480fe0ac);
> -
> -	omap2_enter_full_retention();
> -
> -	omap_writel(mir1, 0x480fe0a4);
> -	omap2_prm_write_mod_reg(wken_wkup, WKUP_MOD, PM_WKEN);
> -
> -	return 0;
> -}
> -
>  static int omap2_pm_enter(suspend_state_t state)
>  {
>  	int ret = 0;
> @@ -281,7 +261,7 @@ static int omap2_pm_enter(suspend_state_t state)
>  	switch (state) {
>  	case PM_SUSPEND_STANDBY:
>  	case PM_SUSPEND_MEM:
> -		ret = omap2_pm_suspend();
> +		omap2_enter_full_retention();
>  		break;
>  	default:
>  		ret = -EINVAL;

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

* ARM: OMAP2xxx: PM: remove obsolete timer disable code in the suspend path
  2012-02-10  8:42 ` Paul Walmsley
  2012-02-10 19:26   ` Kevin Hilman
@ 2012-02-20 22:08   ` Tony Lindgren
  1 sibling, 0 replies; 4+ messages in thread
From: Tony Lindgren @ 2012-02-20 22:08 UTC (permalink / raw)
  To: linux-arm-kernel

* Paul Walmsley <paul@pwsan.com> [120210 00:10]:
> On Thu, 9 Feb 2012, Paul Walmsley wrote:
> 
> > 
> > Remove omap_{read,write}l() from the 24xx PM code.  The clocksource
> > code should now handle what this was supposed to do.
> > 
> > Tested on N800 -- but it's hard to say whether this fixes anything.
> > OMAP24xx static suspend path is currently broken, and this patch
> > doesn't change that.
> > 
> > Signed-off-by: Paul Walmsley <paul@pwsan.com>
> > Cc: Kevin Hilman <khilman@ti.com>
> > Cc: Rob Herring <robherring2@gmail.com>
> > Cc: Tony Lindgren <tony@atomide.com>
> 
> Just realized that a stray change made it into the patch that was posted.
> Below is a version with the stray change removed.  It applies on 
> Tony's v3.3-rc3 testing branch, plus the OMAP2420 serial fix patch that 
> was posted earlier.

Thanks I'll apply this into my clean-up branch along with other
io.h changes. I also have fixed omap_read/write for the following
on omap2+:

plat-omap/dma.c
drivers/gpio/gpio-omap.c

Planning to also fix plat-omap/usb.c.

Regards,

Tony

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

end of thread, other threads:[~2012-02-20 22:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10  3:08 ARM: OMAP2xxx: PM: remove obsolete timer disable code in the suspend path Paul Walmsley
2012-02-10  8:42 ` Paul Walmsley
2012-02-10 19:26   ` Kevin Hilman
2012-02-20 22:08   ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).