[RFC/PATCH] arm: omap3: pm: do not clear power states twice

Subsystems: arm port, omap power management support, omap2+ support, the rest

3 messages, 2 authors, 2012-02-03 · open the first message on its own page

[RFC/PATCH] arm: omap3: pm: do not clear power states twice

From: Felipe Balbi <hidden>
Date: 2012-02-03 07:28:14

The way the code is written, pwrdm_pre_transion()
calls _pwrdm_pre_transition_cb() (for each powerdomain)
which, in turn, calls pwrdm_clear_all_prev_pwrst().

It looks unnecessary to clear all previous power
states twice, so drop the initial set.

Signed-off-by: Felipe Balbi <redacted>
---

Hasn't been tested yet. Compile tested only. It looks
like we can safely remove those calls, but I would
like to hear from the PM folks first :-)

 arch/arm/mach-omap2/pm34xx.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index fc69875..ca1704c 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -290,11 +290,6 @@ void omap_sram_idle(void)
 	int core_prev_state, per_prev_state;
 	u32 sdrc_pwr = 0;
 
-	pwrdm_clear_all_prev_pwrst(mpu_pwrdm);
-	pwrdm_clear_all_prev_pwrst(neon_pwrdm);
-	pwrdm_clear_all_prev_pwrst(core_pwrdm);
-	pwrdm_clear_all_prev_pwrst(per_pwrdm);
-
 	mpu_next_state = pwrdm_read_next_pwrst(mpu_pwrdm);
 	switch (mpu_next_state) {
 	case PWRDM_POWER_ON:
@@ -312,8 +307,10 @@ void omap_sram_idle(void)
 	}
 
 	/* NEON control */
-	if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON)
+	if (pwrdm_read_pwrst(neon_pwrdm) == PWRDM_POWER_ON) {
+		pwrdm_clear_all_prev_pwrst(neon_pwrdm);
 		pwrdm_set_next_pwrst(neon_pwrdm, mpu_next_state);
+	}
 
 	/* Enable IO-PAD and IO-CHAIN wakeups */
 	per_next_state = pwrdm_read_next_pwrst(per_pwrdm);
-- 
1.7.9

[RFC/PATCH] arm: omap3: pm: do not clear power states twice

From: Shilimkar, Santosh <hidden>
Date: 2012-02-03 08:04:55

On Fri, Feb 3, 2012 at 12:58 PM, Felipe Balbi [off-list ref] wrote:
The way the code is written, pwrdm_pre_transion()
calls _pwrdm_pre_transition_cb() (for each powerdomain)
which, in turn, calls pwrdm_clear_all_prev_pwrst().

It looks unnecessary to clear all previous power
states twice, so drop the initial set.

Signed-off-by: Felipe Balbi <redacted>
---

Hasn't been tested yet. Compile tested only. It looks
like we can safely remove those calls, but I would
like to hear from the PM folks first :-)
Bit late :)

Paul already cleaned this up.
http://www.spinics.net/lists/linux-omap/msg63602.html

Regards
santosh

[RFC/PATCH] arm: omap3: pm: do not clear power states twice

From: Felipe Balbi <hidden>
Date: 2012-02-03 08:19:32

On Fri, Feb 03, 2012 at 01:34:55PM +0530, Shilimkar, Santosh wrote:
On Fri, Feb 3, 2012 at 12:58 PM, Felipe Balbi [off-list ref] wrote:
quoted
The way the code is written, pwrdm_pre_transion()
calls _pwrdm_pre_transition_cb() (for each powerdomain)
which, in turn, calls pwrdm_clear_all_prev_pwrst().

It looks unnecessary to clear all previous power
states twice, so drop the initial set.

Signed-off-by: Felipe Balbi <redacted>
---

Hasn't been tested yet. Compile tested only. It looks
like we can safely remove those calls, but I would
like to hear from the PM folks first :-)
Bit late :)

Paul already cleaned this up.
http://www.spinics.net/lists/linux-omap/msg63602.html
that's too bad. Missed an oportunity to have a commit on pm code, heh.
Anyway, thanks

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120203/6b6d9108/attachment.sig>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help