]>
Commit | Line | Data |
---|---|---|
d074880a GKH |
1 | From 7138377ce10455b7183c6dde4b2c51b33f464c45 Mon Sep 17 00:00:00 2001 |
2 | From: Ofir Drang <ofir.drang@arm.com> | |
3 | Date: Thu, 18 Apr 2019 16:39:10 +0300 | |
4 | Subject: crypto: ccree - handle tee fips error during power management resume | |
5 | ||
6 | From: Ofir Drang <ofir.drang@arm.com> | |
7 | ||
8 | commit 7138377ce10455b7183c6dde4b2c51b33f464c45 upstream. | |
9 | ||
10 | in order to support cryptocell tee fips error that may occurs while | |
11 | cryptocell ree is suspended, an cc_tee_handle_fips_error call added | |
12 | to the cc_pm_resume function. | |
13 | ||
14 | Signed-off-by: Ofir Drang <ofir.drang@arm.com> | |
15 | Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> | |
16 | Cc: stable@vger.kernel.org # v4.19+ | |
17 | Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | ||
20 | --- | |
21 | drivers/crypto/ccree/cc_pm.c | 4 +++- | |
22 | 1 file changed, 3 insertions(+), 1 deletion(-) | |
23 | ||
24 | --- a/drivers/crypto/ccree/cc_pm.c | |
25 | +++ b/drivers/crypto/ccree/cc_pm.c | |
26 | @@ -11,6 +11,7 @@ | |
27 | #include "cc_ivgen.h" | |
28 | #include "cc_hash.h" | |
29 | #include "cc_pm.h" | |
30 | +#include "cc_fips.h" | |
31 | ||
32 | #define POWER_DOWN_ENABLE 0x01 | |
33 | #define POWER_DOWN_DISABLE 0x00 | |
34 | @@ -50,12 +51,13 @@ int cc_pm_resume(struct device *dev) | |
35 | } | |
36 | ||
37 | cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE); | |
38 | - | |
39 | rc = init_cc_regs(drvdata, false); | |
40 | if (rc) { | |
41 | dev_err(dev, "init_cc_regs (%x)\n", rc); | |
42 | return rc; | |
43 | } | |
44 | + /* check if tee fips error occurred during power down */ | |
45 | + cc_tee_handle_fips_error(drvdata); | |
46 | ||
47 | rc = cc_resume_req_queue(drvdata); | |
48 | if (rc) { |