Commit a2352998 authored by Nikolaus Voss's avatar Nikolaus Voss Committed by Herbert Xu

crypto: caam - fix CAAM io mem access in blob_gen

IO memory access has to be done with accessors defined in caam/regs.h
as there are little-endian architectures with a big-endian CAAM unit.

Fixes: 6a83830f ("crypto: caam - warn if blob_gen key is insecure")
Signed-off-by: default avatarNikolaus Voss <nikolaus.voss@haag-streit.com>
Reviewed-by: default avatarAhmad Fatoum <a.fatoum@pengutronix.de>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 1b929c02
...@@ -104,7 +104,7 @@ int caam_process_blob(struct caam_blob_priv *priv, ...@@ -104,7 +104,7 @@ int caam_process_blob(struct caam_blob_priv *priv,
} }
ctrlpriv = dev_get_drvdata(jrdev->parent); ctrlpriv = dev_get_drvdata(jrdev->parent);
moo = FIELD_GET(CSTA_MOO, ioread32(&ctrlpriv->ctrl->perfmon.status)); moo = FIELD_GET(CSTA_MOO, rd_reg32(&ctrlpriv->ctrl->perfmon.status));
if (moo != CSTA_MOO_SECURE && moo != CSTA_MOO_TRUSTED) if (moo != CSTA_MOO_SECURE && moo != CSTA_MOO_TRUSTED)
dev_warn(jrdev, dev_warn(jrdev,
"using insecure test key, enable HAB to use unique device key!\n"); "using insecure test key, enable HAB to use unique device key!\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment