void spm_dpidle_after_wfi(void) { #ifdef CONFIG_SMP //if (gpt_check_irq(GPT4)) { if (gpt_check_and_ack_irq(idle_gpt)) { /* waked up by WAKEUP_GPT */ localtimer_set_next_event(1); } else { /* waked up by other wakeup source */ unsigned int cnt, cmp; gpt_get_cnt(idle_gpt, &cnt); gpt_get_cmp(idle_gpt, &cmp); if (unlikely(cmp < cnt)) { idle_err("[%s]GPT%d: counter = %10u, compare = %10u\n", __func__, idle_gpt + 1, cnt, cmp); BUG(); } localtimer_set_next_event(cmp-cnt); stop_gpt(idle_gpt); //GPT_ClearCount(WAKEUP_GPT); } #endif //clkmux_sel(MT_MUX_AUDINTBUS, 1, "Deepidle"); //mainpll clkmgr_faudintbus_sq2pll(); bus_dcm_disable(); dpidle_cnt[0]++; }
void spm_dpidle_after_wfi(void) { #if 0 idle_info("[%s]timer_left=%u, timer_left2=%u, delta=%u\n", dpidle_timer_left, dpidle_timer_left2, dpidle_timer_left-dpidle_timer_left2); #endif //if (gpt_check_irq(GPT4)) { if (gpt_check_and_ack_irq(GPT4)) { /* waked up by WAKEUP_GPT */ localtimer_set_next_event(1); } else { /* waked up by other wakeup source */ unsigned int cnt, cmp; gpt_get_cnt(GPT4, &cnt); gpt_get_cmp(GPT4, &cmp); if (unlikely(cmp < cnt)) { idle_err("[%s]GPT%d: counter = %10u, compare = %10u\n", __func__, GPT4 + 1, cnt, cmp); BUG(); } localtimer_set_next_event(cmp-cnt); stop_gpt(GPT4); //GPT_ClearCount(WAKEUP_GPT); } faudintbus_sq2pll(); bus_dcm_disable(); dpidle_cnt[0]++; }
static void slidle_after_wfi(int cpu) { #ifdef CCI400_CLOCK_SWITCH struct mtk_irq_mask mask; #ifdef CONFIG_SMP if ((atomic_read(&is_in_hotplug) == 0)&&(atomic_read(&hotplug_cpu_count) == 1)) #endif { mt_irq_mask_all(&mask); mt_cirq_clone_gic(); mt_cirq_enable(); cci400_clk_restore(); mt_cirq_flush(); mt_cirq_disable(); mt_irq_mask_restore(&mask); } #endif bus_dcm_disable(); slidle_cnt[cpu]++; }
static void slidle_after_wfi(int cpu) { bus_dcm_disable(); slidle_cnt[cpu]++; }