summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorSantosh Shilimkar <santosh.shilimkar@ti.com>2010-08-28 20:32:43 +0530
committerSebastien Jan <s-jan@ti.com>2010-09-07 15:46:19 +0200
commit949603d7c5981efd38e8b1006d172462157b2ef4 (patch)
tree752bfa6b81ca128fada82f5f15d2a9e3f30821c9 /arch
parentb6b1ac9c0f53064f24f28a7b2347707edf4e28a5 (diff)
omap4: pm-debug: Fix the pwrdomain clockdomain counters
This patch fixes the lopw power powerdomain, clockdomain counters One can mount the debug fs and check the low-power state e.g $cat /proc/sys/debug/pm_debug/count | grep mpu $mpu_pwrdm (ON),OFF:87186,RET:2605909,INA:0,ON:2693096,RET-LOGIC-OFF:2605909 Additionaly MPU OFF is programmed to OFF instead of RET in suspend path Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/mach-omap2/cpuidle44xx.c6
-rw-r--r--arch/arm/mach-omap2/pm44xx.c8
-rw-r--r--arch/arm/mach-omap2/powerdomains.c2
3 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
index 124b08aa314c..53fe278cc295 100644
--- a/arch/arm/mach-omap2/cpuidle44xx.c
+++ b/arch/arm/mach-omap2/cpuidle44xx.c
@@ -112,10 +112,16 @@ static int omap4_enter_idle(struct cpuidle_device *dev,
if (cx->type > OMAP4_STATE_C1)
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &cpu_id);
+#ifdef CONFIG_PM_DEBUG
+ pwrdm_pre_transition();
+#endif
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
pwrdm_set_next_pwrst(mpu_pd, cx->mpu_state);
omap4_enter_lowpower(dev->cpu, cx->cpu0_state);
+#ifdef CONFIG_PM_DEBUG
+ pwrdm_post_transition();
+#endif
if (cx->type > OMAP4_STATE_C1)
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &cpu_id);
diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
index 966d263f5f13..c6491793664a 100644
--- a/arch/arm/mach-omap2/pm44xx.c
+++ b/arch/arm/mach-omap2/pm44xx.c
@@ -60,6 +60,10 @@ static int omap4_pm_suspend(void)
if (wakeup_timer_seconds || wakeup_timer_milliseconds)
omap2_pm_wakeup_on_timer(wakeup_timer_seconds,
wakeup_timer_milliseconds);
+#ifdef CONFIG_PM_DEBUG
+ pwrdm_pre_transition();
+#endif
+
/*
* Clear all wakeup sources and keep
* only Debug UART, Keypad and GPT1 interrupt
@@ -95,6 +99,10 @@ static int omap4_pm_suspend(void)
pwrst->pwrdm->name, state);
}
}
+
+#ifdef CONFIG_PM_DEBUG
+ pwrdm_post_transition();
+#endif
return 0;
}
diff --git a/arch/arm/mach-omap2/powerdomains.c b/arch/arm/mach-omap2/powerdomains.c
index ab622bc4f806..094823cd1ca0 100644
--- a/arch/arm/mach-omap2/powerdomains.c
+++ b/arch/arm/mach-omap2/powerdomains.c
@@ -122,6 +122,8 @@ int _get_mem_bank_lastmemst_mask(u8 bank)
return OMAP3430_LASTSHAREDL2CACHEFLATSTATEENTERED_MASK;
case 3:
return OMAP3430_LASTL2FLATMEMSTATEENTERED_MASK;
+ case 4:
+ return OMAP4430_OCP_NRET_BANK_STATEST_MASK;
default:
WARN_ON(1); /* should never happen */
return -EEXIST;