mirror of
https://github.com/torvalds/linux.git
synced 2026-05-05 06:52:34 -04:00
Add power sequence for vpu4 by reusing from previous generation wherever possible. Hook up vpu4 op with vpu4 specific implemtation or resue from earlier generation wherever feasible, like clock calculation in this case. Co-developed-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Signed-off-by: Vishnu Reddy <busanna.reddy@oss.qualcomm.com> Signed-off-by: Vikash Garodia <vikash.garodia@oss.qualcomm.com> Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com> Signed-off-by: Bryan O'Donoghue <bod@kernel.org> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
43 lines
1.6 KiB
C
43 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
|
*/
|
|
|
|
#ifndef __IRIS_VPU_COMMON_H__
|
|
#define __IRIS_VPU_COMMON_H__
|
|
|
|
struct iris_core;
|
|
|
|
extern const struct vpu_ops iris_vpu2_ops;
|
|
extern const struct vpu_ops iris_vpu3_ops;
|
|
extern const struct vpu_ops iris_vpu33_ops;
|
|
extern const struct vpu_ops iris_vpu35_ops;
|
|
extern const struct vpu_ops iris_vpu4x_ops;
|
|
|
|
struct vpu_ops {
|
|
void (*power_off_hw)(struct iris_core *core);
|
|
int (*power_on_hw)(struct iris_core *core);
|
|
int (*power_off_controller)(struct iris_core *core);
|
|
int (*power_on_controller)(struct iris_core *core);
|
|
void (*program_bootup_registers)(struct iris_core *core);
|
|
u64 (*calc_freq)(struct iris_inst *inst, size_t data_size);
|
|
};
|
|
|
|
int iris_vpu_boot_firmware(struct iris_core *core);
|
|
void iris_vpu_raise_interrupt(struct iris_core *core);
|
|
void iris_vpu_clear_interrupt(struct iris_core *core);
|
|
int iris_vpu_watchdog(struct iris_core *core, u32 intr_status);
|
|
int iris_vpu_prepare_pc(struct iris_core *core);
|
|
int iris_vpu_power_on_controller(struct iris_core *core);
|
|
int iris_vpu_power_on_hw(struct iris_core *core);
|
|
int iris_vpu_power_on(struct iris_core *core);
|
|
int iris_vpu_power_off_controller(struct iris_core *core);
|
|
void iris_vpu_power_off_hw(struct iris_core *core);
|
|
void iris_vpu_power_off(struct iris_core *core);
|
|
int iris_vpu35_vpu4x_power_off_controller(struct iris_core *core);
|
|
int iris_vpu35_vpu4x_power_on_controller(struct iris_core *core);
|
|
void iris_vpu35_vpu4x_program_bootup_registers(struct iris_core *core);
|
|
u64 iris_vpu3x_vpu4x_calculate_frequency(struct iris_inst *inst, size_t data_size);
|
|
|
|
#endif
|