public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] OMAP3: Cpuidle fixes
@ 2009-10-26 13:10 Tero Kristo
  2009-10-26 13:10 ` [PATCH 1/2] OMAP3: PM: Check BM for C2 state Tero Kristo
  0 siblings, 1 reply; 5+ messages in thread
From: Tero Kristo @ 2009-10-26 13:10 UTC (permalink / raw)
  To: linux-omap

From: Tero Kristo <tero.kristo@nokia.com>

Following patches apply on top of PM branch. They implement a couple of
small fixes for cpuidle. Timer resolution patch probably does not change
anything until kernel cpuidle is fixed to support longer timers (there are
some pending patches for this.)

-Tero



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

* [PATCH 1/2] OMAP3: PM: Check BM for C2 state
  2009-10-26 13:10 [PATCH 0/2] OMAP3: Cpuidle fixes Tero Kristo
@ 2009-10-26 13:10 ` Tero Kristo
  2009-10-26 13:10   ` [PATCH 2/2] OMAP3: CPUidle: Fixed timer resolution Tero Kristo
  2009-10-26 18:54   ` [PATCH 1/2] OMAP3: PM: Check BM for C2 state Kevin Hilman
  0 siblings, 2 replies; 5+ messages in thread
From: Tero Kristo @ 2009-10-26 13:10 UTC (permalink / raw)
  To: linux-omap; +Cc: De-Schrijver Peter

From: De-Schrijver Peter <Peter.De-Schrijver@nokia.com>

C2 can't be entered while we have bus activity.

Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
---
 arch/arm/mach-omap2/cpuidle34xx.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index c44a942..a0d9f56 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -38,7 +38,7 @@
 
 #define OMAP3_MAX_STATES 7
 #define OMAP3_STATE_C1 0 /* C1 - MPU WFI + Core active */
-#define OMAP3_STATE_C2 1 /* C2 - MPU WFI + Core inactive */
+#define OMAP3_STATE_C2 1 /* C2 - MPU inactive + Core inactive */
 #define OMAP3_STATE_C3 2 /* C3 - MPU CSWR + Core inactive */
 #define OMAP3_STATE_C4 3 /* C4 - MPU OFF + Core iactive */
 #define OMAP3_STATE_C5 4 /* C5 - MPU RET + Core RET */
@@ -169,7 +169,7 @@ DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
  *
  * Below is the desciption of each C state.
  * 	C1 . MPU WFI + Core active
- *	C2 . MPU WFI + Core inactive
+ *	C2 . MPU inactive + Core inactive
  *	C3 . MPU CSWR + Core inactive
  *	C4 . MPU OFF + Core inactive
  *	C5 . MPU CSWR + Core CSWR
@@ -196,7 +196,8 @@ void omap_init_power_states(void)
 	omap3_power_states[OMAP3_STATE_C2].threshold = 30;
 	omap3_power_states[OMAP3_STATE_C2].mpu_state = PWRDM_POWER_ON;
 	omap3_power_states[OMAP3_STATE_C2].core_state = PWRDM_POWER_ON;
-	omap3_power_states[OMAP3_STATE_C2].flags = CPUIDLE_FLAG_TIME_VALID;
+	omap3_power_states[OMAP3_STATE_C2].flags = CPUIDLE_FLAG_TIME_VALID |
+				CPUIDLE_FLAG_CHECK_BM;
 
 	/* C3 . MPU CSWR + Core inactive */
 	omap3_power_states[OMAP3_STATE_C3].valid = 1;
-- 
1.5.4.3


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

* [PATCH 2/2] OMAP3: CPUidle: Fixed timer resolution
  2009-10-26 13:10 ` [PATCH 1/2] OMAP3: PM: Check BM for C2 state Tero Kristo
@ 2009-10-26 13:10   ` Tero Kristo
  2009-11-12  0:30     ` Kevin Hilman
  2009-10-26 18:54   ` [PATCH 1/2] OMAP3: PM: Check BM for C2 state Kevin Hilman
  1 sibling, 1 reply; 5+ messages in thread
From: Tero Kristo @ 2009-10-26 13:10 UTC (permalink / raw)
  To: linux-omap

From: Tero Kristo <tero.kristo@nokia.com>

Previously used u32 as temporary data storage that wraps around at 4.294s.

Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
---
 arch/arm/mach-omap2/cpuidle34xx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index a0d9f56..0ac3b63 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -137,7 +137,7 @@ return_sleep_time:
 	local_irq_enable();
 	local_fiq_enable();
 
-	return (u32)timespec_to_ns(&ts_idle)/1000;
+	return ts_idle.tv_nsec / NSEC_PER_USEC + ts_idle.tv_sec * USEC_PER_SEC;
 }
 
 /**
-- 
1.5.4.3


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

* Re: [PATCH 1/2] OMAP3: PM: Check BM for C2 state
  2009-10-26 13:10 ` [PATCH 1/2] OMAP3: PM: Check BM for C2 state Tero Kristo
  2009-10-26 13:10   ` [PATCH 2/2] OMAP3: CPUidle: Fixed timer resolution Tero Kristo
@ 2009-10-26 18:54   ` Kevin Hilman
  1 sibling, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2009-10-26 18:54 UTC (permalink / raw)
  To: Tero Kristo; +Cc: linux-omap, De-Schrijver Peter

Tero Kristo <tero.kristo@nokia.com> writes:

> From: De-Schrijver Peter <Peter.De-Schrijver@nokia.com>
>
> C2 can't be entered while we have bus activity.

Why?

For the benefit of git history, can you add a more verbose changelog
please describing why?

Otherwise, patch looks fine.

Thanks,

Kevin

> Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
> ---
>  arch/arm/mach-omap2/cpuidle34xx.c |    7 ++++---
>  1 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
> index c44a942..a0d9f56 100644
> --- a/arch/arm/mach-omap2/cpuidle34xx.c
> +++ b/arch/arm/mach-omap2/cpuidle34xx.c
> @@ -38,7 +38,7 @@
>  
>  #define OMAP3_MAX_STATES 7
>  #define OMAP3_STATE_C1 0 /* C1 - MPU WFI + Core active */
> -#define OMAP3_STATE_C2 1 /* C2 - MPU WFI + Core inactive */
> +#define OMAP3_STATE_C2 1 /* C2 - MPU inactive + Core inactive */
>  #define OMAP3_STATE_C3 2 /* C3 - MPU CSWR + Core inactive */
>  #define OMAP3_STATE_C4 3 /* C4 - MPU OFF + Core iactive */
>  #define OMAP3_STATE_C5 4 /* C5 - MPU RET + Core RET */
> @@ -169,7 +169,7 @@ DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
>   *
>   * Below is the desciption of each C state.
>   * 	C1 . MPU WFI + Core active
> - *	C2 . MPU WFI + Core inactive
> + *	C2 . MPU inactive + Core inactive
>   *	C3 . MPU CSWR + Core inactive
>   *	C4 . MPU OFF + Core inactive
>   *	C5 . MPU CSWR + Core CSWR
> @@ -196,7 +196,8 @@ void omap_init_power_states(void)
>  	omap3_power_states[OMAP3_STATE_C2].threshold = 30;
>  	omap3_power_states[OMAP3_STATE_C2].mpu_state = PWRDM_POWER_ON;
>  	omap3_power_states[OMAP3_STATE_C2].core_state = PWRDM_POWER_ON;
> -	omap3_power_states[OMAP3_STATE_C2].flags = CPUIDLE_FLAG_TIME_VALID;
> +	omap3_power_states[OMAP3_STATE_C2].flags = CPUIDLE_FLAG_TIME_VALID |
> +				CPUIDLE_FLAG_CHECK_BM;
>  
>  	/* C3 . MPU CSWR + Core inactive */
>  	omap3_power_states[OMAP3_STATE_C3].valid = 1;
> -- 
> 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 2/2] OMAP3: CPUidle: Fixed timer resolution
  2009-10-26 13:10   ` [PATCH 2/2] OMAP3: CPUidle: Fixed timer resolution Tero Kristo
@ 2009-11-12  0:30     ` Kevin Hilman
  0 siblings, 0 replies; 5+ messages in thread
From: Kevin Hilman @ 2009-11-12  0:30 UTC (permalink / raw)
  To: Tero Kristo; +Cc: linux-omap

Tero Kristo <tero.kristo@nokia.com> writes:

> From: Tero Kristo <tero.kristo@nokia.com>
>
> Previously used u32 as temporary data storage that wraps around at 4.294s.
>
> Signed-off-by: Tero Kristo <tero.kristo@nokia.com>

Thanks, applying to PM branch, queing for pm-fixes.

Kevin

> ---
>  arch/arm/mach-omap2/cpuidle34xx.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
> index a0d9f56..0ac3b63 100644
> --- a/arch/arm/mach-omap2/cpuidle34xx.c
> +++ b/arch/arm/mach-omap2/cpuidle34xx.c
> @@ -137,7 +137,7 @@ return_sleep_time:
>  	local_irq_enable();
>  	local_fiq_enable();
>  
> -	return (u32)timespec_to_ns(&ts_idle)/1000;
> +	return ts_idle.tv_nsec / NSEC_PER_USEC + ts_idle.tv_sec * USEC_PER_SEC;
>  }
>  
>  /**
> -- 
> 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

end of thread, other threads:[~2009-11-12  0:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-26 13:10 [PATCH 0/2] OMAP3: Cpuidle fixes Tero Kristo
2009-10-26 13:10 ` [PATCH 1/2] OMAP3: PM: Check BM for C2 state Tero Kristo
2009-10-26 13:10   ` [PATCH 2/2] OMAP3: CPUidle: Fixed timer resolution Tero Kristo
2009-11-12  0:30     ` Kevin Hilman
2009-10-26 18:54   ` [PATCH 1/2] OMAP3: PM: Check BM for C2 state Kevin Hilman

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