Ejemplo n.º 1
0
static inline int mcidle_handler(int cpu)
{

    if (idle_switch[IDLE_TYPE_MC]) {
        if (mcidle_can_enter(cpu)) {
            go_to_mcidle(cpu);
            return 1;
        }
    }

    return 0;
}
static inline int mcidle_handler(int cpu)
{

#if 1
    if (idle_switch[IDLE_TYPE_MC]) {
        if (mcidle_can_enter(cpu)) {
            go_to_mcidle(cpu);
            //go_to_soidle(0,cpu);
            return 1;
        }
    }
#else

    if (idle_switch[IDLE_TYPE_MC]) {
        mtk_wdt_suspend();
        for(;;)
        {
            if(cpu==1)
            {
                printk("MCDI start\n");
                spm_go_to_mcdi_ipi_test(cpu);
                printk("MCDI %s\n",spm_get_wake_up_result(SPM_PCM_SODI));
            }
            if(cpu==0)
            {


#if 1

                if(spm_read(SPM_FC1_PWR_CON)==0x32)
                {
                    //printk("IPI start\n");
                    spm_check_core_status_before(2);
                    //printk("1. SPM_PCM_EVENT_VECTOR2 = 0x%x, SPM_PCM_REG15_DATA = 0x%x \n", spm_read(SPM_PCM_EVENT_VECTOR2),spm_read(SPM_PCM_REG15_DATA));
                    //mdelay(1);
                    spm_check_core_status_after(2);
                    //printk("2. SPM_PCM_EVENT_VECTOR2 = 0x%x, SPM_PCM_REG15_DATA = 0x%x \n", spm_read(SPM_PCM_EVENT_VECTOR2),spm_read(SPM_PCM_REG15_DATA));
                }
#endif

            }
        }
    }

#endif
    return 0;
}