linux/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.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_CPTPF_UCODE_H
#define __OTX_CPTPF_UCODE_H

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

/* CPT ucode name maximum length */
#define OTX_CPT_UCODE_NAME_LENGTH
/*
 * On OcteonTX 83xx platform, only one type of engines is allowed to be
 * attached to an engine group.
 */
#define OTX_CPT_MAX_ETYPES_PER_GRP

/* Default tar archive file names */
#define OTX_CPT_UCODE_TAR_FILE_NAME

/* CPT ucode alignment */
#define OTX_CPT_UCODE_ALIGNMENT

/* CPT ucode signature size */
#define OTX_CPT_UCODE_SIGN_LEN

/* Microcode version string length */
#define OTX_CPT_UCODE_VER_STR_SZ

/* Maximum number of supported engines/cores on OcteonTX 83XX platform */
#define OTX_CPT_MAX_ENGINES

#define OTX_CPT_ENGS_BITMASK_LEN

/* Microcode types */
enum otx_cpt_ucode_type {};

struct otx_cpt_bitmap {};

struct otx_cpt_engines {};

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

struct otx_cpt_ucode_hdr {};

struct otx_cpt_ucode {};

struct tar_ucode_info_t {};

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

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

struct otx_cpt_mirror_info {};

struct otx_cpt_eng_grp_info {};

struct otx_cpt_eng_grps {};

int otx_cpt_init_eng_grps(struct pci_dev *pdev,
			  struct otx_cpt_eng_grps *eng_grps, int pf_type);
void otx_cpt_cleanup_eng_grps(struct pci_dev *pdev,
			      struct otx_cpt_eng_grps *eng_grps);
int otx_cpt_try_create_default_eng_grps(struct pci_dev *pdev,
					struct otx_cpt_eng_grps *eng_grps,
					int pf_type);
void otx_cpt_set_eng_grps_is_rdonly(struct otx_cpt_eng_grps *eng_grps,
				    bool is_rdonly);
int otx_cpt_uc_supports_eng_type(struct otx_cpt_ucode *ucode, int eng_type);
int otx_cpt_eng_grp_has_eng_type(struct otx_cpt_eng_grp_info *eng_grp,
				 int eng_type);

#endif /* __OTX_CPTPF_UCODE_H */