linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] OMAP3 PM: fix the error messages printed when the system suspend
@ 2010-06-22  8:31 Stanley.Miao
  2010-06-22 15:11 ` Kevin Hilman
  0 siblings, 1 reply; 5+ messages in thread
From: Stanley.Miao @ 2010-06-22  8:31 UTC (permalink / raw)
  To: linux-omap

omap3505/omap3517 don't have the bit OMAP3430_EN_IO and the bit
OMAP3430_EN_IO_CHAIN in the register PM_WKEN_WKUP. When the system
suspend, the following messages will be printed:

"Wake up daisy chain activation failed."

Now fix it by adding "if (!cpu_is_omap3505() && !cpu_is_omap3517())".

Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
---
 arch/arm/mach-omap2/pm34xx.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index 62529ff..d16648a 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -385,8 +385,9 @@ void omap_sram_idle(void)
 	/* Enable IO-PAD and IO-CHAIN wakeups */
 	per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
 	core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
-	if (per_next_state < PWRDM_POWER_ON ||
-			core_next_state < PWRDM_POWER_ON) {
+	if (!cpu_is_omap3505() && !cpu_is_omap3517() && \
+			(per_next_state < PWRDM_POWER_ON || \
+			  core_next_state < PWRDM_POWER_ON)) {
 		prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
 		omap3_enable_io_chain();
 	}
@@ -479,7 +480,8 @@ void omap_sram_idle(void)
 	}
 
 	/* Disable IO-PAD and IO-CHAIN wakeup */
-	if (core_next_state < PWRDM_POWER_ON) {
+	if ((core_next_state < PWRDM_POWER_ON) && \
+			!cpu_is_omap3505() && !cpu_is_omap3517()) {
 		prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
 		omap3_disable_io_chain();
 	}
-- 
1.5.4.3


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

* Re: [PATCH] OMAP3 PM: fix the error messages printed when the system suspend
  2010-06-22  8:31 [PATCH] OMAP3 PM: fix the error messages printed when the system suspend Stanley.Miao
@ 2010-06-22 15:11 ` Kevin Hilman
  2010-08-09 21:29   ` Cliff Brake
  0 siblings, 1 reply; 5+ messages in thread
From: Kevin Hilman @ 2010-06-22 15:11 UTC (permalink / raw)
  To: Stanley.Miao; +Cc: linux-omap

"Stanley.Miao" <stanley.miao@windriver.com> writes:

First, the subject needs to be more descriptive:

OMAP3: AM3505/3517 do not have IO wakeup capability

> omap3505/omap3517 don't have the bit OMAP3430_EN_IO and the bit
> OMAP3430_EN_IO_CHAIN in the register PM_WKEN_WKUP. When the system
> suspend, the following messages will be printed:
>
> "Wake up daisy chain activation failed."
>
> Now fix it by adding "if (!cpu_is_omap3505() && !cpu_is_omap3517())".

Rather than the CPU is checks, I'd rather see this fixed by checking
for a "feature" (see <plat/cpu.h.), something like
omap3_has_io_wakeup().

Kevin

> Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
> ---
>  arch/arm/mach-omap2/pm34xx.c |    8 +++++---
>  1 files changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
> index 62529ff..d16648a 100644
> --- a/arch/arm/mach-omap2/pm34xx.c
> +++ b/arch/arm/mach-omap2/pm34xx.c
> @@ -385,8 +385,9 @@ void omap_sram_idle(void)
>  	/* Enable IO-PAD and IO-CHAIN wakeups */
>  	per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
>  	core_next_state = pwrdm_read_next_pwrst(core_pwrdm);
> -	if (per_next_state < PWRDM_POWER_ON ||
> -			core_next_state < PWRDM_POWER_ON) {
> +	if (!cpu_is_omap3505() && !cpu_is_omap3517() && \
> +			(per_next_state < PWRDM_POWER_ON || \
> +			  core_next_state < PWRDM_POWER_ON)) {
>  		prm_set_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
>  		omap3_enable_io_chain();
>  	}
> @@ -479,7 +480,8 @@ void omap_sram_idle(void)
>  	}
>  
>  	/* Disable IO-PAD and IO-CHAIN wakeup */
> -	if (core_next_state < PWRDM_POWER_ON) {
> +	if ((core_next_state < PWRDM_POWER_ON) && \
> +			!cpu_is_omap3505() && !cpu_is_omap3517()) {
>  		prm_clear_mod_reg_bits(OMAP3430_EN_IO_MASK, WKUP_MOD, PM_WKEN);
>  		omap3_disable_io_chain();
>  	}
> -- 
> 1.5.4.3
>
> --
> 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

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

* Re: [PATCH] OMAP3 PM: fix the error messages printed when the system suspend
  2010-06-22 15:11 ` Kevin Hilman
@ 2010-08-09 21:29   ` Cliff Brake
  2010-08-10  1:30     ` stanley.miao
  0 siblings, 1 reply; 5+ messages in thread
From: Cliff Brake @ 2010-08-09 21:29 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: Stanley.Miao, linux-omap

On Tue, Jun 22, 2010 at 11:11 AM, Kevin Hilman
<khilman@deeprootsystems.com> wrote:
> "Stanley.Miao" <stanley.miao@windriver.com> writes:
>
> First, the subject needs to be more descriptive:
>
> OMAP3: AM3505/3517 do not have IO wakeup capability

Functionally, what does this statement mean?  The 3503 seems to have
the EN_IO [8] bit, but I've yet to figure out what the EN_IO_CHAIN
[16] means.

Thanks,
Cliff

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

* Re: [PATCH] OMAP3 PM: fix the error messages printed when the system suspend
  2010-08-09 21:29   ` Cliff Brake
@ 2010-08-10  1:30     ` stanley.miao
  2010-08-10 22:16       ` Cliff Brake
  0 siblings, 1 reply; 5+ messages in thread
From: stanley.miao @ 2010-08-10  1:30 UTC (permalink / raw)
  To: Cliff Brake; +Cc: Kevin Hilman, linux-omap

Cliff Brake wrote:
> On Tue, Jun 22, 2010 at 11:11 AM, Kevin Hilman
> <khilman@deeprootsystems.com> wrote:
>   
>> "Stanley.Miao" <stanley.miao@windriver.com> writes:
>>
>> First, the subject needs to be more descriptive:
>>
>> OMAP3: AM3505/3517 do not have IO wakeup capability
>>     
>
> Functionally, what does this statement mean?  The 3503 seems to have
> the EN_IO [8] bit, but I've yet to figure out what the EN_IO_CHAIN
> [16] means.
>   

Please reference to Chapter 4.11 PRCM Off-Mode Management in OMAP35x TRM.

Stanley.
> Thanks,
> Cliff
>
>   


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

* Re: [PATCH] OMAP3 PM: fix the error messages printed when the system suspend
  2010-08-10  1:30     ` stanley.miao
@ 2010-08-10 22:16       ` Cliff Brake
  0 siblings, 0 replies; 5+ messages in thread
From: Cliff Brake @ 2010-08-10 22:16 UTC (permalink / raw)
  To: stanley.miao; +Cc: Kevin Hilman, linux-omap

On Mon, Aug 9, 2010 at 9:30 PM, stanley.miao <stanley.miao@windriver.com> wrote:
> Cliff Brake wrote:
>>
>> Functionally, what does this statement mean?  The 3503 seems to have
>> the EN_IO [8] bit, but I've yet to figure out what the EN_IO_CHAIN
>> [16] means.
>>
>
> Please reference to Chapter 4.11 PRCM Off-Mode Management in OMAP35x TRM.

Thanks for the pointer.  Do you know offhand what TI documentation
details the differences between the 3503 and the 3530 in this regard.
I'm also trying to piece together what practical impact this will have
on a system.

I have an older 3503 system, and it is still spewing "Wake up daisy
chain activation failed" messages.  Do you expect the following patch
would have fixed this?

So I then instrumented the following macros:

CLIFF: cpu_is_omap3503 = 0
CLIFF: cpu_is_omap3515 = 0
CLIFF: cpu_is_omap3525 = 0
CLIFF: cpu_is_omap3530 = 0
CLIFF: is_omap3430 = 0
CLIFF: omap3_has_iva = 2
CLIFF: omap3_has_sgx = 0
CLIFF: omap3_has_io_wakeup = 64

Perhaps it is not a 3503???  The kernel prints the following on bootup:
OMAP3525 ES2.1 (l2cache iva neon isp )

But, then I look at u-boot, and see:
OMAP3503-GP ES2.1, CPU-OPP2, L3-165MHz, Max clock-600Mhz

So not everyone is telling the same story.  Anyway, it seems we have a
problem in that the cpu_is_xxx macros are not working.

Thanks,
Cliff

commit ad0c63f1d623ea9d3e0c0521d5ce9cd522c4e1f0
Author: stanley.miao <stanley.miao@windriver.com>
Date:   Mon Aug 2 14:21:40 2010 +0300

    OMAP3: AM3505/3517 do not have IO wakeup capability

    AM3505/3517 doesn't have IO wakeup capability, so we do not need to set
    the bit OMAP3430_EN_IO and the bit OMAP3430_EN_IO_CHAIN in the register
    PM_WKEN_WKUP when the system enters suspend state.

    Tested on AM3517EVM and OMAP3530EVM.

    Signed-off-by: Stanley.Miao <stanley.miao@windriver.com>
    Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
    Signed-off-by: Tony Lindgren <tony@atomide.com>
--
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

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

end of thread, other threads:[~2010-08-10 22:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-22  8:31 [PATCH] OMAP3 PM: fix the error messages printed when the system suspend Stanley.Miao
2010-06-22 15:11 ` Kevin Hilman
2010-08-09 21:29   ` Cliff Brake
2010-08-10  1:30     ` stanley.miao
2010-08-10 22:16       ` Cliff Brake

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).