Commit 7138377c authored by Ofir Drang's avatar Ofir Drang Committed by Herbert Xu

crypto: ccree - handle tee fips error during power management resume

in order to support cryptocell tee fips error that may occurs while
cryptocell ree is suspended, an cc_tee_handle_fips_error  call added
to the cc_pm_resume function.
Signed-off-by: default avatarOfir Drang <ofir.drang@arm.com>
Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 897ab231
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "cc_ivgen.h" #include "cc_ivgen.h"
#include "cc_hash.h" #include "cc_hash.h"
#include "cc_pm.h" #include "cc_pm.h"
#include "cc_fips.h"
#define POWER_DOWN_ENABLE 0x01 #define POWER_DOWN_ENABLE 0x01
#define POWER_DOWN_DISABLE 0x00 #define POWER_DOWN_DISABLE 0x00
...@@ -50,12 +51,13 @@ int cc_pm_resume(struct device *dev) ...@@ -50,12 +51,13 @@ int cc_pm_resume(struct device *dev)
} }
cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE); cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE);
rc = init_cc_regs(drvdata, false); rc = init_cc_regs(drvdata, false);
if (rc) { if (rc) {
dev_err(dev, "init_cc_regs (%x)\n", rc); dev_err(dev, "init_cc_regs (%x)\n", rc);
return rc; return rc;
} }
/* check if tee fips error occurred during power down */
cc_tee_handle_fips_error(drvdata);
rc = cc_resume_req_queue(drvdata); rc = cc_resume_req_queue(drvdata);
if (rc) { if (rc) {
......
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