diff options
author | Ofir Drang <ofir.drang@arm.com> | 2019-04-18 09:39:10 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-04-25 03:38:16 -0400 |
commit | 7138377ce10455b7183c6dde4b2c51b33f464c45 (patch) | |
tree | 4105fb0ab1f6a3a71e3a997ca12994c0bffcedf6 | |
parent | 897ab2316910a66bb048f1c9cefa25e6a592dcd7 (diff) |
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: Ofir Drang <ofir.drang@arm.com>
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/ccree/cc_pm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c index 77025da2dcb6..2dad9c9543c6 100644 --- a/drivers/crypto/ccree/cc_pm.c +++ b/drivers/crypto/ccree/cc_pm.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include "cc_ivgen.h" | 11 | #include "cc_ivgen.h" |
12 | #include "cc_hash.h" | 12 | #include "cc_hash.h" |
13 | #include "cc_pm.h" | 13 | #include "cc_pm.h" |
14 | #include "cc_fips.h" | ||
14 | 15 | ||
15 | #define POWER_DOWN_ENABLE 0x01 | 16 | #define POWER_DOWN_ENABLE 0x01 |
16 | #define POWER_DOWN_DISABLE 0x00 | 17 | #define POWER_DOWN_DISABLE 0x00 |
@@ -50,12 +51,13 @@ int cc_pm_resume(struct device *dev) | |||
50 | } | 51 | } |
51 | 52 | ||
52 | cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE); | 53 | cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE); |
53 | |||
54 | rc = init_cc_regs(drvdata, false); | 54 | rc = init_cc_regs(drvdata, false); |
55 | if (rc) { | 55 | if (rc) { |
56 | dev_err(dev, "init_cc_regs (%x)\n", rc); | 56 | dev_err(dev, "init_cc_regs (%x)\n", rc); |
57 | return rc; | 57 | return rc; |
58 | } | 58 | } |
59 | /* check if tee fips error occurred during power down */ | ||
60 | cc_tee_handle_fips_error(drvdata); | ||
59 | 61 | ||
60 | rc = cc_resume_req_queue(drvdata); | 62 | rc = cc_resume_req_queue(drvdata); |
61 | if (rc) { | 63 | if (rc) { |