1 /* SPDX-License-Identifier: GPL-2.0-only */ 2 /* 3 * Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved. 4 */ 5 6 #ifndef __IRIS_VPU_COMMON_H__ 7 #define __IRIS_VPU_COMMON_H__ 8 9 struct iris_core; 10 11 extern const struct vpu_ops iris_vpu2_ops; 12 extern const struct vpu_ops iris_vpu3_ops; 13 extern const struct vpu_ops iris_vpu33_ops; 14 15 struct vpu_ops { 16 void (*power_off_hw)(struct iris_core *core); 17 int (*power_off_controller)(struct iris_core *core); 18 u64 (*calc_freq)(struct iris_inst *inst, size_t data_size); 19 }; 20 21 int iris_vpu_boot_firmware(struct iris_core *core); 22 void iris_vpu_raise_interrupt(struct iris_core *core); 23 void iris_vpu_clear_interrupt(struct iris_core *core); 24 int iris_vpu_watchdog(struct iris_core *core, u32 intr_status); 25 int iris_vpu_prepare_pc(struct iris_core *core); 26 int iris_vpu_power_on(struct iris_core *core); 27 int iris_vpu_power_off_controller(struct iris_core *core); 28 void iris_vpu_power_off_hw(struct iris_core *core); 29 void iris_vpu_power_off(struct iris_core *core); 30 31 #endif 32