/** * omap_enter_idle_[simple/coupled] - OMAP4PLUS cpuidle entry functions * @dev: cpuidle device * @drv: cpuidle driver * @index: the index of state to be entered * * Called from the CPUidle framework to program the device to the * specified low power state selected by the governor. * Returns the amount of time spent in the low power state.
*/ staticint omap_enter_idle_simple(struct cpuidle_device *dev, struct cpuidle_driver *drv, int index)
{
omap_do_wfi(); return index;
}
/* * CPU0 has to wait and stay ON until CPU1 is OFF state. * This is necessary to honour hardware recommondation * of triggeing all the possible low power modes once CPU1 is * out of coherency and in OFF mode.
*/ if (dev->cpu == 0 && cpumask_test_cpu(1, cpu_online_mask)) { while (pwrdm_read_pwrst(cpu_pd[1]) != PWRDM_POWER_OFF) {
cpu_relax();
/* * CPU1 could have already entered & exited idle * without hitting off because of a wakeup * or a failed attempt to hit off mode. Check for * that here, otherwise we could spin forever * waiting for CPU1 off.
*/ if (cpu_done[1]) goto fail;
/* Enter broadcast mode for periodic timers */
tick_broadcast_enable();
/* Enter broadcast mode for one-shot timers */
tick_broadcast_enter();
/* * Call idle CPU PM enter notifier chain so that * VFP and per CPU interrupt context is saved.
*/
error = cpu_pm_enter(); if (error) goto cpu_pm_out;
if (dev->cpu == 0) {
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
/* * Call idle CPU cluster PM enter notifier chain * to save GIC and wakeupgen context.
*/ if (mpuss_can_lose_context) {
error = cpu_cluster_pm_enter(); if (error) {
index = 0;
cx = state_ptr + index;
pwrdm_set_logic_retst(mpu_pd, cx->mpu_logic_state);
omap_set_pwrdm_state(mpu_pd, cx->mpu_state);
mpuss_can_lose_context = 0;
}
}
}
/** * omap4_idle_init - Init routine for OMAP4+ idle * * Registers the OMAP4+ specific cpuidle driver to the cpuidle * framework with the valid set of states.
*/ int __init omap4_idle_init(void)
{ struct cpuidle_driver *idle_driver;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.