25 #include <linux/sched.h>
27 #include <linux/export.h>
75 static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;
90 goto return_sleep_time;
178 if ((cx->
mpu_state >= mpu_deepest_state) &&
186 for (idx = index - 1; idx >= 0; idx--) {
187 cx = &omap3_idle_data[
idx];
188 if ((cx->
mpu_state >= mpu_deepest_state) &&
212 u32 core_next_state, per_next_state = 0, per_saved_state = 0;
223 new_state_idx = next_valid_state(dev, drv, index);
234 cx = &omap3_idle_data[new_state_idx];
237 if (new_state_idx == 0) {
239 if (per_next_state < core_next_state)
240 per_next_state = core_next_state;
252 if (per_next_state != per_saved_state)
255 ret = omap3_enter_idle(dev, drv, new_state_idx);
258 if (per_next_state != per_saved_state)
267 .name =
"omap3_idle",
271 .enter = omap3_enter_idle_bm,
272 .exit_latency = 2 + 2,
273 .target_residency = 5,
276 .desc =
"MPU ON + CORE ON",
279 .enter = omap3_enter_idle_bm,
280 .exit_latency = 10 + 10,
281 .target_residency = 30,
284 .desc =
"MPU ON + CORE ON",
287 .enter = omap3_enter_idle_bm,
288 .exit_latency = 50 + 50,
289 .target_residency = 300,
292 .desc =
"MPU RET + CORE ON",
295 .enter = omap3_enter_idle_bm,
296 .exit_latency = 1500 + 1800,
297 .target_residency = 4000,
300 .desc =
"MPU OFF + CORE ON",
303 .enter = omap3_enter_idle_bm,
304 .exit_latency = 2500 + 7500,
305 .target_residency = 12000,
308 .desc =
"MPU RET + CORE RET",
311 .enter = omap3_enter_idle_bm,
312 .exit_latency = 3000 + 8500,
313 .target_residency = 15000,
316 .desc =
"MPU OFF + CORE RET",
319 .enter = omap3_enter_idle_bm,
320 .exit_latency = 10000 + 30000,
321 .target_residency = 30000,
324 .desc =
"MPU OFF + CORE OFF",
328 .safe_state_index = 0,
346 if (!mpu_pd || !core_pd || !per_pd || !cam_pd)