Lines Matching refs:ops
63 struct mtk_cpu_pm_ops *ops; member
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); in get_mediatek_pstate()
114 mtk_cpu_pwr.ops->mcusys_resume(state); in armv8_2_mcusys_pwr_on_common()
126 mtk_cpu_pwr.ops->mcusys_suspend(state); in armv8_2_mcusys_pwr_dwn_common()
140 mtk_cpu_pwr.ops->cluster_resume(state); in armv8_2_cluster_pwr_on_common()
148 mtk_cpu_pwr.ops->cluster_suspend(state); in armv8_2_cluster_pwr_dwn_common()
184 mtk_cpu_pwr.ops->cpu_resume(state); in armv8_2_cpu_pwr_resume()
191 mtk_cpu_pwr.ops->cpu_suspend(state); in armv8_2_cpu_pwr_suspend()
362 if (mtk_cpu_pwr.ops == NULL) { in armv8_2_validate_power_state()
367 if (mtk_cpu_pwr.ops->pwr_state_valid(aff_lvl, pstate) != 0) { in armv8_2_validate_power_state()
393 ret = mtk_cpu_pwr.ops->pwr_state_valid(PLAT_MAX_PWR_LVL, in armv8_2_get_sys_suspend_power_state()
458 int register_cpu_pm_ops(unsigned int fn_flags, struct mtk_cpu_pm_ops *ops) in register_cpu_pm_ops() argument
463 if ((ops == NULL) || (mtk_cpu_pwr.ops != NULL)) { in register_cpu_pm_ops()
468 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_RESUME_CORE, in register_cpu_pm_ops()
471 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SUSPEND_CORE, in register_cpu_pm_ops()
474 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_RESUME_CLUSTER, in register_cpu_pm_ops()
477 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SUSPEND_CLUSTER, in register_cpu_pm_ops()
480 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_RESUME_MCUSYS, in register_cpu_pm_ops()
483 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SUSPEND_MCUSYS, in register_cpu_pm_ops()
486 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_CPUPM_GET_PWR_STATE, in register_cpu_pm_ops()
489 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_PWR_STATE_VALID, in register_cpu_pm_ops()
492 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_INIT, in register_cpu_pm_ops()
496 mtk_cpu_pwr.ops = ops; in register_cpu_pm_ops()
509 int register_cpu_smp_ops(unsigned int fn_flags, struct mtk_cpu_smp_ops *ops) in register_cpu_smp_ops() argument
514 if ((ops == NULL) || (mtk_cpu_pwr.smp != NULL)) { in register_cpu_smp_ops()
519 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SMP_INIT, in register_cpu_smp_ops()
522 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_PWR_ON_CORE_PREPARE, in register_cpu_smp_ops()
525 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SMP_CORE_ON, in register_cpu_smp_ops()
528 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SMP_CORE_OFF, in register_cpu_smp_ops()
532 mtk_cpu_pwr.smp = ops; in register_cpu_smp_ops()