linux/drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h

/* SPDX-License-Identifier: GPL-2.0-only
 * Copyright (C) 2020 Marvell.
 */

#ifndef __OTX2_CPTPF_UCODE_H
#define __OTX2_CPTPF_UCODE_H

#include <linux/pci.h>
#include <linux/types.h>
#include <linux/module.h>
#include "otx2_cpt_hw_types.h"
#include "otx2_cpt_common.h"

/*
 * On OcteonTX2 platform IPSec ucode can use both IE and SE engines therefore
 * IE and SE engines can be attached to the same engine group.
 */
#define OTX2_CPT_MAX_ETYPES_PER_GRP

/* CPT ucode signature size */
#define OTX2_CPT_UCODE_SIGN_LEN

/* Microcode version string length */
#define OTX2_CPT_UCODE_VER_STR_SZ

/* Maximum number of supported engines/cores on OcteonTX2/CN10K platform */
#define OTX2_CPT_MAX_ENGINES

#define OTX2_CPT_ENGS_BITMASK_LEN

#define OTX2_CPT_UCODE_SZ

/* Microcode types */
enum otx2_cpt_ucode_type {};

struct otx2_cpt_bitmap {};

struct otx2_cpt_engines {};

/* Microcode version number */
struct otx2_cpt_ucode_ver_num {};

struct otx2_cpt_ucode_hdr {};

struct otx2_cpt_ucode {};

struct otx2_cpt_uc_info_t {};

/* Maximum and current number of engines available for all engine groups */
struct otx2_cpt_engs_available {};

/* Engines reserved to an engine group */
struct otx2_cpt_engs_rsvd {};

struct otx2_cpt_mirror_info {};

struct otx2_cpt_eng_grp_info {};

struct otx2_cpt_eng_grps {};
struct otx2_cptpf_dev;
int otx2_cpt_init_eng_grps(struct pci_dev *pdev,
			   struct otx2_cpt_eng_grps *eng_grps);
void otx2_cpt_cleanup_eng_grps(struct pci_dev *pdev,
			       struct otx2_cpt_eng_grps *eng_grps);
int otx2_cpt_create_eng_grps(struct otx2_cptpf_dev *cptpf,
			     struct otx2_cpt_eng_grps *eng_grps);
int otx2_cpt_disable_all_cores(struct otx2_cptpf_dev *cptpf);
int otx2_cpt_get_eng_grp(struct otx2_cpt_eng_grps *eng_grps, int eng_type);
int otx2_cpt_discover_eng_capabilities(struct otx2_cptpf_dev *cptpf);
int otx2_cpt_dl_custom_egrp_create(struct otx2_cptpf_dev *cptpf,
				   struct devlink_param_gset_ctx *ctx);
int otx2_cpt_dl_custom_egrp_delete(struct otx2_cptpf_dev *cptpf,
				   struct devlink_param_gset_ctx *ctx);
void otx2_cpt_print_uc_dbg_info(struct otx2_cptpf_dev *cptpf);
struct otx2_cpt_engs_rsvd *find_engines_by_type(
					struct otx2_cpt_eng_grp_info *eng_grp,
					int eng_type);
#endif /* __OTX2_CPTPF_UCODE_H */