X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fcrypto%2Fcaam_jr%2Fcaam_jr.c;h=8c56610ac82af643e00e73bd7c9eaf4b491154ab;hb=d54c72ec1568ab128d1bebeaa763f10e74d7c231;hp=c004ec40773f9abeef0a7937faaeb44c503930e2;hpb=9c99878aa1b16de26fcce82c112b401766dd910e;p=dpdk.git diff --git a/drivers/crypto/caam_jr/caam_jr.c b/drivers/crypto/caam_jr/caam_jr.c index c004ec4077..8c56610ac8 100644 --- a/drivers/crypto/caam_jr/caam_jr.c +++ b/drivers/crypto/caam_jr/caam_jr.c @@ -9,7 +9,7 @@ #include #include -#include +#include #include #include #include @@ -2368,6 +2368,8 @@ caam_jr_dev_init(const char *name, security_instance->sess_cnt = 0; dev->security_ctx = security_instance; + rte_cryptodev_pmd_probing_finish(dev); + RTE_LOG(INFO, PMD, "%s cryptodev init\n", dev->data->name); return 0; @@ -2388,6 +2390,8 @@ init_error: static int cryptodev_caam_jr_probe(struct rte_vdev_device *vdev) { + int ret; + struct rte_cryptodev_pmd_init_params init_params = { "", sizeof(struct sec_job_ring_t), @@ -2404,6 +2408,12 @@ cryptodev_caam_jr_probe(struct rte_vdev_device *vdev) input_args = rte_vdev_device_args(vdev); rte_cryptodev_pmd_parse_input_args(&init_params, input_args); + ret = of_init(); + if (ret) { + RTE_LOG(ERR, PMD, + "of_init failed\n"); + return -EINVAL; + } /* if sec device version is not configured */ if (!rta_get_sec_era()) { const struct device_node *caam_node; @@ -2414,7 +2424,7 @@ cryptodev_caam_jr_probe(struct rte_vdev_device *vdev) NULL); if (prop) { rta_set_sec_era( - INTL_SEC_ERA(cpu_to_caam32(*prop))); + INTL_SEC_ERA(rte_be_to_cpu_32(*prop))); break; } }