1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2018 Cavium, Inc
6 #include <rte_common.h>
8 #include "otx_cryptodev_hw_access.h"
10 #include "cpt_pmd_logs.h"
13 otx_cpt_vf_init(struct cpt_vf *cptvf)
17 CPT_LOG_DP_DEBUG("%s: %s done", cptvf->dev_name, __func__);
23 otx_cpt_poll_misc(struct cpt_vf *cptvf)
29 otx_cpt_hw_init(struct cpt_vf *cptvf, void *pdev, void *reg_base, char *name)
31 memset(cptvf, 0, sizeof(struct cpt_vf));
33 /* Bar0 base address */
34 cptvf->reg_base = reg_base;
35 strncpy(cptvf->dev_name, name, 32);
39 /* To clear if there are any pending mbox msgs */
40 otx_cpt_poll_misc(cptvf);
42 if (otx_cpt_vf_init(cptvf)) {
43 CPT_LOG_ERR("Failed to initialize CPT VF device");