linux/drivers/crypto/cavium/cpt/cptvf.h

/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (C) 2016 Cavium, Inc.
 */

#ifndef __CPTVF_H
#define __CPTVF_H

#include <linux/list.h>
#include "cpt_common.h"

/* Default command queue length */
#define CPT_CMD_QLEN
#define CPT_CMD_QCHUNK_SIZE

/* Default command timeout in seconds */
#define CPT_COMMAND_TIMEOUT
#define CPT_TIMER_THOLD
#define CPT_NUM_QS_PER_VF
#define CPT_INST_SIZE
#define CPT_NEXT_CHUNK_PTR_SIZE

#define CPT_VF_MSIX_VECTORS
#define CPT_VF_INTR_MBOX_MASK
#define CPT_VF_INTR_DOVF_MASK
#define CPT_VF_INTR_IRDE_MASK
#define CPT_VF_INTR_NWRP_MASK
#define CPT_VF_INTR_SERR_MASK
#define DMA_DIRECT_DIRECT
#define DMA_GATHER_SCATTER
#define FROM_DPTR

/**
 * Enumeration cpt_vf_int_vec_e
 *
 * CPT VF MSI-X Vector Enumeration
 * Enumerates the MSI-X interrupt vectors.
 */
enum cpt_vf_int_vec_e {};

struct command_chunk {};

struct command_queue {};

struct command_qinfo {};

struct pending_entry {};

struct pending_queue {};

struct pending_qinfo {};

#define for_each_pending_queue(qinfo, q, i)

struct cpt_vf {};

int cptvf_send_vf_up(struct cpt_vf *cptvf);
int cptvf_send_vf_down(struct cpt_vf *cptvf);
int cptvf_send_vf_to_grp_msg(struct cpt_vf *cptvf);
int cptvf_send_vf_priority_msg(struct cpt_vf *cptvf);
int cptvf_send_vq_size_msg(struct cpt_vf *cptvf);
int cptvf_check_pf_ready(struct cpt_vf *cptvf);
void cptvf_handle_mbox_intr(struct cpt_vf *cptvf);
void cvm_crypto_exit(void);
int cvm_crypto_init(struct cpt_vf *cptvf);
void vq_post_process(struct cpt_vf *cptvf, u32 qno);
void cptvf_write_vq_doorbell(struct cpt_vf *cptvf, u32 val);
#endif /* __CPTVF_H */