Lines Matching refs:ops

75 	struct mtk_cpu_pm_ops *ops;  member
81 .ops = NULL,
84 #define IS_CPUIDLE_FN_ENABLE(x) (imtk_cpu_pwr.ops && (imtk_cpu_pwr.fn_mask & (x)))
96 mret = imtk_cpu_pwr.ops->get_pstate( \
116 imtk_cpu_pwr.ops->mcusys_resume(state); in mcusys_pwr_on_common()
126 imtk_cpu_pwr.ops->mcusys_suspend(state); in mcusys_pwr_dwn_common()
136 imtk_cpu_pwr.ops->cluster_resume(state); in cluster_pwr_on_common()
142 imtk_cpu_pwr.ops->cluster_suspend(state); in cluster_pwr_dwn_common()
167 imtk_cpu_pwr.ops->cpu_resume(state); in cpu_pwr_resume()
174 imtk_cpu_pwr.ops->cpu_suspend(state); in cpu_pwr_suspend()
341 if (!imtk_cpu_pwr.ops) in validate_power_state()
347 ret = imtk_cpu_pwr.ops->pwr_state_valid(aff_lvl, pstate); in validate_power_state()
388 ret = imtk_cpu_pwr.ops->pwr_domain_pwr_down_wfi(cpu); in pwr_domain_pwr_down_wfi()
437 if ((mode == MTK_CPU_PM_CPUIDLE) && imtk_cpu_pwr.ops && in plat_pm_invoke_func()
438 imtk_cpu_pwr.ops->invoke) in plat_pm_invoke_func()
439 ret = imtk_cpu_pwr.ops->invoke(id, priv); in plat_pm_invoke_func()
448 int register_cpu_pm_ops(unsigned int fn_flags, struct mtk_cpu_pm_ops *ops) in register_cpu_pm_ops() argument
453 if (!ops || imtk_cpu_pwr.ops) { in register_cpu_pm_ops()
457 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_RESUME_CORE, in register_cpu_pm_ops()
459 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SUSPEND_CORE, in register_cpu_pm_ops()
461 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_RESUME_CLUSTER, in register_cpu_pm_ops()
463 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SUSPEND_CLUSTER, in register_cpu_pm_ops()
465 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_RESUME_MCUSYS, in register_cpu_pm_ops()
468 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SUSPEND_MCUSYS, in register_cpu_pm_ops()
470 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_CPUPM_GET_PWR_STATE, in register_cpu_pm_ops()
472 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_PWR_STATE_VALID, in register_cpu_pm_ops()
474 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_INIT, in register_cpu_pm_ops()
476 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_PWR_DOMAIN_POWER_DOWN_WFI, in register_cpu_pm_ops()
479 imtk_cpu_pwr.ops = ops; in register_cpu_pm_ops()
492 int register_cpu_smp_ops(unsigned int fn_flags, struct mtk_cpu_smp_ops *ops) in register_cpu_smp_ops() argument
497 if (!ops || imtk_cpu_pwr.smp) { in register_cpu_smp_ops()
502 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SMP_INIT, in register_cpu_smp_ops()
505 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_PWR_ON_CORE_PREPARE, in register_cpu_smp_ops()
508 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SMP_CORE_ON, in register_cpu_smp_ops()
511 CPM_PM_FN_CHECK(fn_flags, ops, MTK_CPUPM_FN_SMP_CORE_OFF, in register_cpu_smp_ops()
515 imtk_cpu_pwr.smp = ops; in register_cpu_smp_ops()