linux/drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.h

/* SPDX-License-Identifier: GPL-2.0
 * Marvell OcteonTX CPT driver
 *
 * Copyright (C) 2019 Marvell International Ltd.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */

#ifndef __OTX_CPTVF_REQUEST_MANAGER_H
#define __OTX_CPTVF_REQUEST_MANAGER_H

#include <linux/types.h>
#include <linux/crypto.h>
#include <linux/pci.h>
#include "otx_cpt_hw_types.h"

/*
 * Maximum total number of SG buffers is 100, we divide it equally
 * between input and output
 */
#define OTX_CPT_MAX_SG_IN_CNT
#define OTX_CPT_MAX_SG_OUT_CNT

/* DMA mode direct or SG */
#define OTX_CPT_DMA_DIRECT_DIRECT
#define OTX_CPT_DMA_GATHER_SCATTER

/* Context source CPTR or DPTR */
#define OTX_CPT_FROM_CPTR
#define OTX_CPT_FROM_DPTR

/* CPT instruction queue alignment */
#define OTX_CPT_INST_Q_ALIGNMENT
#define OTX_CPT_MAX_REQ_SIZE

/* Default command timeout in seconds */
#define OTX_CPT_COMMAND_TIMEOUT
#define OTX_CPT_TIMER_HOLD
#define OTX_CPT_COUNT_HOLD
#define OTX_CPT_TIME_IN_RESET_COUNT

/* Minimum and maximum values for interrupt coalescing */
#define OTX_CPT_COALESC_MIN_TIME_WAIT
#define OTX_CPT_COALESC_MAX_TIME_WAIT
#define OTX_CPT_COALESC_MIN_NUM_WAIT
#define OTX_CPT_COALESC_MAX_NUM_WAIT

otx_cpt_opcode_info;

struct otx_cptvf_request {};

struct otx_cpt_buf_ptr {};

otx_cpt_ctrl_info;

/*
 * CPT_INST_S software command definitions
 * Words EI (0-3)
 */
otx_cpt_iq_cmd_word0;

otx_cpt_iq_cmd_word3;

struct otx_cpt_iq_cmd {};

struct otx_cpt_sglist_component {};

struct otx_cpt_pending_entry {};

struct otx_cpt_pending_queue {};

struct otx_cpt_req_info {};

struct otx_cpt_info_buffer {};

static inline void do_request_cleanup(struct pci_dev *pdev,
				      struct otx_cpt_info_buffer *info)
{}

struct otx_cptvf_wqe;
void otx_cpt_dump_sg_list(struct pci_dev *pdev, struct otx_cpt_req_info *req);
void otx_cpt_post_process(struct otx_cptvf_wqe *wqe);
int otx_cpt_do_request(struct pci_dev *pdev, struct otx_cpt_req_info *req,
		       int cpu_num);

#endif /* __OTX_CPTVF_REQUEST_MANAGER_H */