#include <linux/delay.h>
#include <linux/iopoll.h>
#include <linux/mutex.h>
#include <linux/types.h>
#include "adf_accel_devices.h"
#include "adf_common_drv.h"
#include "adf_gen2_pfvf.h"
#include "adf_pfvf_msg.h"
#include "adf_pfvf_pf_proto.h"
#include "adf_pfvf_vf_proto.h"
#include "adf_pfvf_utils.h"
#define ADF_GEN2_VF_MSK …
#define ADF_GEN2_ERR_REG_VF2PF(vf_src) …
#define ADF_GEN2_ERR_MSK_VF2PF(vf_mask) …
#define ADF_GEN2_PF_PF2VF_OFFSET(i) …
#define ADF_GEN2_VF_PF2VF_OFFSET …
#define ADF_GEN2_CSR_IN_USE …
#define ADF_GEN2_CSR_IN_USE_MASK …
enum gen2_csr_pos { … };
#define ADF_PFVF_GEN2_MSGTYPE_SHIFT …
#define ADF_PFVF_GEN2_MSGTYPE_MASK …
#define ADF_PFVF_GEN2_MSGDATA_SHIFT …
#define ADF_PFVF_GEN2_MSGDATA_MASK …
static const struct pfvf_csr_format csr_gen2_fmt = …;
#define ADF_PFVF_MSG_RETRY_DELAY …
#define ADF_PFVF_MSG_MAX_RETRIES …
static u32 adf_gen2_pf_get_pfvf_offset(u32 i)
{ … }
static u32 adf_gen2_vf_get_pfvf_offset(u32 i)
{ … }
static void adf_gen2_enable_vf2pf_interrupts(void __iomem *pmisc_addr, u32 vf_mask)
{ … }
static void adf_gen2_disable_all_vf2pf_interrupts(void __iomem *pmisc_addr)
{ … }
static u32 adf_gen2_disable_pending_vf2pf_interrupts(void __iomem *pmisc_addr)
{ … }
static u32 gen2_csr_get_int_bit(enum gen2_csr_pos offset)
{ … }
static u32 gen2_csr_msg_to_position(u32 csr_msg, enum gen2_csr_pos offset)
{ … }
static u32 gen2_csr_msg_from_position(u32 csr_val, enum gen2_csr_pos offset)
{ … }
static bool gen2_csr_is_in_use(u32 msg, enum gen2_csr_pos offset)
{ … }
static void gen2_csr_clear_in_use(u32 *msg, enum gen2_csr_pos offset)
{ … }
static void gen2_csr_set_in_use(u32 *msg, enum gen2_csr_pos offset)
{ … }
static bool is_legacy_user_pfvf_message(u32 msg)
{ … }
static bool is_pf2vf_notification(u8 msg_type)
{ … }
static bool is_vf2pf_notification(u8 msg_type)
{ … }
struct pfvf_gen2_params { … };
static int adf_gen2_pfvf_send(struct adf_accel_dev *accel_dev,
struct pfvf_message msg,
struct pfvf_gen2_params *params)
{ … }
static struct pfvf_message adf_gen2_pfvf_recv(struct adf_accel_dev *accel_dev,
struct pfvf_gen2_params *params)
{ … }
static int adf_gen2_pf2vf_send(struct adf_accel_dev *accel_dev, struct pfvf_message msg,
u32 pfvf_offset, struct mutex *csr_lock)
{ … }
static int adf_gen2_vf2pf_send(struct adf_accel_dev *accel_dev, struct pfvf_message msg,
u32 pfvf_offset, struct mutex *csr_lock)
{ … }
static struct pfvf_message adf_gen2_pf2vf_recv(struct adf_accel_dev *accel_dev,
u32 pfvf_offset, u8 compat_ver)
{ … }
static struct pfvf_message adf_gen2_vf2pf_recv(struct adf_accel_dev *accel_dev,
u32 pfvf_offset, u8 compat_ver)
{ … }
void adf_gen2_init_pf_pfvf_ops(struct adf_pfvf_ops *pfvf_ops)
{ … }
EXPORT_SYMBOL_GPL(…);
void adf_gen2_init_vf_pfvf_ops(struct adf_pfvf_ops *pfvf_ops)
{ … }
EXPORT_SYMBOL_GPL(…);