crypto: ccree - handle tee fips error during power management resume
authorOfir Drang <ofir.drang@arm.com>
Thu, 18 Apr 2019 13:39:10 +0000 (16:39 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 25 Apr 2019 07:38:16 +0000 (15:38 +0800)
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>
drivers/crypto/ccree/cc_pm.c

index 77025da2dcb639ef236e235e2b80fdd3ac228b11..2dad9c9543c6990236ae3816d6aaf27c0635c361 100644 (file)
@@ -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
@@ -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) {