Skip to content

Commit

Permalink
crypto: ccree - handle tee fips error during power management resume
Browse files Browse the repository at this point in the history
commit 7138377 upstream.

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: Ofir Drang <[email protected]>
Signed-off-by: Gilad Ben-Yossef <[email protected]>
Cc: [email protected] # v4.19+
Signed-off-by: Herbert Xu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
ofirdrang authored and gregkh committed May 22, 2019
1 parent 4fb3d87 commit 681f369
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/crypto/ccree/cc_pm.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "cc_ivgen.h"
#include "cc_hash.h"
#include "cc_pm.h"
#include "cc_fips.h"

#define POWER_DOWN_ENABLE 0x01
#define POWER_DOWN_DISABLE 0x00
Expand Down Expand Up @@ -50,12 +51,13 @@ int cc_pm_resume(struct device *dev)
}

cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE);

rc = init_cc_regs(drvdata, false);
if (rc) {
dev_err(dev, "init_cc_regs (%x)\n", rc);
return rc;
}
/* check if tee fips error occurred during power down */
cc_tee_handle_fips_error(drvdata);

rc = cc_resume_req_queue(drvdata);
if (rc) {
Expand Down

0 comments on commit 681f369

Please sign in to comment.