Skip to content

Commit

Permalink
crypto: caam/qi - abort algorithm setup on DPAA2 parts
Browse files Browse the repository at this point in the history
caam/qi frontend (i.e. caamalg_qi) mustn't be used in case it runs on a
DPAA2 part (this could happen when using a multiplatform kernel).

Fixes: 297b9ce ("crypto: caam/jr - add support for DPAA2 parts")
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Horia Geantă authored and Herbert Xu committed Nov 3, 2017
1 parent cc2f8ab commit d3b5a87
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion drivers/crypto/caam/caamalg_qi.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/

#include "compat.h"

#include "ctrl.h"
#include "regs.h"
#include "intern.h"
#include "desc_constr.h"
Expand Down Expand Up @@ -2312,6 +2312,11 @@ static int __init caam_qi_algapi_init(void)
if (!priv || !priv->qi_present)
return -ENODEV;

if (caam_dpaa2) {
dev_info(ctrldev, "caam/qi frontend driver not suitable for DPAA 2.x, aborting...\n");
return -ENODEV;
}

INIT_LIST_HEAD(&alg_list);

/*
Expand Down

0 comments on commit d3b5a87

Please sign in to comment.