summaryrefslogtreecommitdiffstats
path: root/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0004-OMAP2-PM-idle-clkdms-only-if-already-in-idle.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0004-OMAP2-PM-idle-clkdms-only-if-already-in-idle.patch')
-rw-r--r--extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0004-OMAP2-PM-idle-clkdms-only-if-already-in-idle.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0004-OMAP2-PM-idle-clkdms-only-if-already-in-idle.patch b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0004-OMAP2-PM-idle-clkdms-only-if-already-in-idle.patch
new file mode 100644
index 00000000..16eedf9a
--- /dev/null
+++ b/extras/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpuidle/0004-OMAP2-PM-idle-clkdms-only-if-already-in-idle.patch
@@ -0,0 +1,50 @@
1From cec133850aa42c03d912c764aaa441677e782eca Mon Sep 17 00:00:00 2001
2From: Rajendra Nayak <rnayak@ti.com>
3Date: Tue, 5 Apr 2011 15:22:48 +0530
4Subject: [PATCH 4/6] OMAP2+: PM: idle clkdms only if already in idle
5
6The omap_set_pwrdm_state function forces clockdomains
7to idle, without checking the existing idle state
8programmed, instead based solely on the HW capability
9of the clockdomain to support idle.
10This is wrong and the clockdomains should be idled
11post a state_switch *only* if idle transitions on the
12clockdomain were already enabled.
13
14Signed-off-by: Rajendra Nayak <rnayak@ti.com>
15---
16 arch/arm/mach-omap2/pm.c | 4 +++-
17 1 files changed, 3 insertions(+), 1 deletions(-)
18
19diff --git a/arch/arm/mach-omap2/pm.c b/arch/arm/mach-omap2/pm.c
20index d48813f..840b0e1 100644
21--- a/arch/arm/mach-omap2/pm.c
22+++ b/arch/arm/mach-omap2/pm.c
23@@ -108,6 +108,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
24 u32 cur_state;
25 int sleep_switch = -1;
26 int ret = 0;
27+ int hwsup = 0;
28
29 if (pwrdm == NULL || IS_ERR(pwrdm))
30 return -EINVAL;
31@@ -127,6 +128,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
32 (pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) {
33 sleep_switch = LOWPOWERSTATE_SWITCH;
34 } else {
35+ hwsup = clkdm_is_idle(pwrdm->pwrdm_clkdms[0]);
36 clkdm_wakeup(pwrdm->pwrdm_clkdms[0]);
37 pwrdm_wait_transition(pwrdm);
38 sleep_switch = FORCEWAKEUP_SWITCH;
39@@ -142,7 +144,7 @@ int omap_set_pwrdm_state(struct powerdomain *pwrdm, u32 state)
40
41 switch (sleep_switch) {
42 case FORCEWAKEUP_SWITCH:
43- if (pwrdm->pwrdm_clkdms[0]->flags & CLKDM_CAN_ENABLE_AUTO)
44+ if (hwsup)
45 clkdm_allow_idle(pwrdm->pwrdm_clkdms[0]);
46 else
47 clkdm_sleep(pwrdm->pwrdm_clkdms[0]);
48--
491.6.6.1
50