xref: /linux/drivers/crypto/intel/qat/qat_common/adf_admin.h (revision 8e1bb4a41aa78d6105e59186af3dcd545fc66e70)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /* Copyright(c) 2023 Intel Corporation */
3 #ifndef ADF_ADMIN
4 #define ADF_ADMIN
5 
6 #include "icp_qat_fw_init_admin.h"
7 
8 struct adf_accel_dev;
9 
10 int adf_init_admin_comms(struct adf_accel_dev *accel_dev);
11 void adf_exit_admin_comms(struct adf_accel_dev *accel_dev);
12 int adf_send_admin_init(struct adf_accel_dev *accel_dev);
13 int adf_get_ae_fw_counters(struct adf_accel_dev *accel_dev, u16 ae, u64 *reqs, u64 *resps);
14 int adf_init_admin_pm(struct adf_accel_dev *accel_dev, u32 idle_delay);
15 int adf_send_admin_tim_sync(struct adf_accel_dev *accel_dev, u32 cnt);
16 int adf_send_admin_hb_timer(struct adf_accel_dev *accel_dev, uint32_t ticks);
17 int adf_send_admin_rl_init(struct adf_accel_dev *accel_dev,
18 			   struct icp_qat_fw_init_admin_slice_cnt *slices);
19 int adf_send_admin_rl_add_update(struct adf_accel_dev *accel_dev,
20 				 struct icp_qat_fw_init_admin_req *req);
21 int adf_send_admin_rl_delete(struct adf_accel_dev *accel_dev, u16 node_id,
22 			     u8 node_type);
23 int adf_get_fw_timestamp(struct adf_accel_dev *accel_dev, u64 *timestamp);
24 int adf_get_pm_info(struct adf_accel_dev *accel_dev, dma_addr_t p_state_addr, size_t buff_size);
25 int adf_get_cnv_stats(struct adf_accel_dev *accel_dev, u16 ae, u16 *err_cnt, u16 *latest_err);
26 int adf_send_admin_tl_start(struct adf_accel_dev *accel_dev,
27 			    dma_addr_t tl_dma_addr, size_t layout_sz, u8 *rp_indexes,
28 			    struct icp_qat_fw_init_admin_slice_cnt *slice_count);
29 int adf_send_admin_tl_stop(struct adf_accel_dev *accel_dev);
30 
31 #endif
32