aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Pihet <jean.pihet@newoldbits.com>2012-06-01 11:11:08 -0400
committerKevin Hilman <khilman@ti.com>2012-06-25 14:24:24 -0400
commit05011f711fc751456972d126bbb8081723629408 (patch)
tree92a79b38473b6ec1aa25b366a5caf1fa2e86a901
parent13d65c897e93dfeaed6fe28233559239f9676164 (diff)
ARM: OMAP3: PM: cpuidle: optimize the clkdm idle latency in C1 state
For a power domain to idle all the clock domains in it must idle. This patch implements an optimization of the cpuidle code by denying and later allowing only the first registered clock domain of a power domain, and so optimizes the latency of the low power code. The functions _cpuidle_allow_idle and _cpuidle_deny_idle are not used anymore and so are removed. Signed-off-by: Jean Pihet <j-pihet@ti.com> Signed-off-by: Kevin Hilman <khilman@ti.com>
-rw-r--r--arch/arm/mach-omap2/cpuidle34xx.c22
1 files changed, 4 insertions, 18 deletions
diff --git a/arch/arm/mach-omap2/cpuidle34xx.c b/arch/arm/mach-omap2/cpuidle34xx.c
index 2e2f1c6f0f0b..e6ae3fe5cdc6 100644
--- a/arch/arm/mach-omap2/cpuidle34xx.c
+++ b/arch/arm/mach-omap2/cpuidle34xx.c
@@ -77,20 +77,6 @@ static struct omap3_idle_statedata omap3_idle_data[] = {
77 77
78static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd; 78static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;
79 79
80static int _cpuidle_allow_idle(struct powerdomain *pwrdm,
81 struct clockdomain *clkdm)
82{
83 clkdm_allow_idle(clkdm);
84 return 0;
85}
86
87static int _cpuidle_deny_idle(struct powerdomain *pwrdm,
88 struct clockdomain *clkdm)
89{
90 clkdm_deny_idle(clkdm);
91 return 0;
92}
93
94static int __omap3_enter_idle(struct cpuidle_device *dev, 80static int __omap3_enter_idle(struct cpuidle_device *dev,
95 struct cpuidle_driver *drv, 81 struct cpuidle_driver *drv,
96 int index) 82 int index)
@@ -108,8 +94,8 @@ static int __omap3_enter_idle(struct cpuidle_device *dev,
108 94
109 /* Deny idle for C1 */ 95 /* Deny idle for C1 */
110 if (index == 0) { 96 if (index == 0) {
111 pwrdm_for_each_clkdm(mpu_pd, _cpuidle_deny_idle); 97 clkdm_deny_idle(mpu_pd->pwrdm_clkdms[0]);
112 pwrdm_for_each_clkdm(core_pd, _cpuidle_deny_idle); 98 clkdm_deny_idle(core_pd->pwrdm_clkdms[0]);
113 } 99 }
114 100
115 /* 101 /*
@@ -131,8 +117,8 @@ static int __omap3_enter_idle(struct cpuidle_device *dev,
131 117
132 /* Re-allow idle for C1 */ 118 /* Re-allow idle for C1 */
133 if (index == 0) { 119 if (index == 0) {
134 pwrdm_for_each_clkdm(mpu_pd, _cpuidle_allow_idle); 120 clkdm_allow_idle(mpu_pd->pwrdm_clkdms[0]);
135 pwrdm_for_each_clkdm(core_pd, _cpuidle_allow_idle); 121 clkdm_allow_idle(core_pd->pwrdm_clkdms[0]);
136 } 122 }
137 123
138return_sleep_time: 124return_sleep_time: