Lines Matching defs:ops

63 	struct mtk_cpu_pm_ops *ops;
69 .ops = NULL,
72 #define IS_CPUIDLE_FN_ENABLE(x) ((mtk_cpu_pwr.ops != NULL) && ((mtk_cpu_pwr.fn_mask & x) != 0))
84 return mtk_cpu_pwr.ops->get_pstate(domain, psci_state, state);
114 mtk_cpu_pwr.ops->mcusys_resume(state);
126 mtk_cpu_pwr.ops->mcusys_suspend(state);
140 mtk_cpu_pwr.ops->cluster_resume(state);
148 mtk_cpu_pwr.ops->cluster_suspend(state);
184 mtk_cpu_pwr.ops->cpu_resume(state);
191 mtk_cpu_pwr.ops->cpu_suspend(state);
362 if (mtk_cpu_pwr.ops == NULL) {
367 if (mtk_cpu_pwr.ops->pwr_state_valid(aff_lvl, pstate) != 0) {
393 ret = mtk_cpu_pwr.ops->pwr_state_valid(PLAT_MAX_PWR_LVL,
458 int register_cpu_pm_ops(unsigned int fn_flags, struct mtk_cpu_pm_ops *ops)
463 if ((ops == NULL) || (mtk_cpu_pwr.ops != NULL)) {
468 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_RESUME_CORE,
471 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SUSPEND_CORE,
474 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_RESUME_CLUSTER,
477 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SUSPEND_CLUSTER,
480 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_RESUME_MCUSYS,
483 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SUSPEND_MCUSYS,
486 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_CPUPM_GET_PWR_STATE,
489 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_PWR_STATE_VALID,
492 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_INIT,
496 mtk_cpu_pwr.ops = ops;
499 INFO("[%s:%d] CPU pwr ops register success, support:0x%x\n",
502 ERROR("[%s:%d] register cpu_pm ops fail !, fn:0x%x\n",
509 int register_cpu_smp_ops(unsigned int fn_flags, struct mtk_cpu_smp_ops *ops)
514 if ((ops == NULL) || (mtk_cpu_pwr.smp != NULL)) {
519 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SMP_INIT,
522 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_PWR_ON_CORE_PREPARE,
525 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SMP_CORE_ON,
528 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SMP_CORE_OFF,
532 mtk_cpu_pwr.smp = ops;
535 INFO("[%s:%d] CPU smp ops register success, support:0x%x\n",
538 ERROR("[%s:%d] register cpu_smp ops fail !, fn:0x%x\n",