1 /* SPDX-License-Identifier: BSD-3-Clause */ 2 /* Copyright(c) 2007-2022 Intel Corporation */ 3 #ifndef ADF_TRANSPORT_H 4 #define ADF_TRANSPORT_H 5 6 #include "adf_accel_devices.h" 7 8 struct adf_etr_ring_data; 9 10 typedef void (*adf_callback_fn)(void *resp_msg); 11 12 int adf_create_ring(struct adf_accel_dev *accel_dev, 13 const char *section, 14 u32 bank_num, 15 u32 num_mgs, 16 u32 msg_size, 17 const char *ring_name, 18 adf_callback_fn callback, 19 int poll_mode, 20 struct adf_etr_ring_data **ring_ptr); 21 22 int adf_send_message(struct adf_etr_ring_data *ring, u32 *msg); 23 void adf_remove_ring(struct adf_etr_ring_data *ring); 24 int adf_poll_bank(u32 accel_id, u32 bank_num, u32 quota); 25 int adf_poll_all_banks(u32 accel_id, u32 quota); 26 #endif /* ADF_TRANSPORT_H */ 27