diff options
author | Ofir Drang <ofir.drang@arm.com> | 2019-04-18 09:39:08 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-04-25 03:38:16 -0400 |
commit | 3499efbeed39d114873267683b9e776bcb34b058 (patch) | |
tree | 2a29f1b8bc99add7c180992bb86b5a03432566ef | |
parent | 1fc165721be84001d124132947775360bc301511 (diff) |
crypto: ccree - HOST_POWER_DOWN_EN should be the last CC access during suspend
During power management suspend the driver need to prepare the device
for the power down operation and as a last indication write to the
HOST_POWER_DOWN_EN register which signals to the hardware that
The ccree is ready for power down.
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c index 9a5abe406996..77025da2dcb6 100644 --- a/drivers/crypto/ccree/cc_pm.c +++ b/drivers/crypto/ccree/cc_pm.c | |||
@@ -25,13 +25,13 @@ int cc_pm_suspend(struct device *dev) | |||
25 | int rc; | 25 | int rc; |
26 | 26 | ||
27 | dev_dbg(dev, "set HOST_POWER_DOWN_EN\n"); | 27 | dev_dbg(dev, "set HOST_POWER_DOWN_EN\n"); |
28 | cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_ENABLE); | ||
29 | rc = cc_suspend_req_queue(drvdata); | 28 | rc = cc_suspend_req_queue(drvdata); |
30 | if (rc) { | 29 | if (rc) { |
31 | dev_err(dev, "cc_suspend_req_queue (%x)\n", rc); | 30 | dev_err(dev, "cc_suspend_req_queue (%x)\n", rc); |
32 | return rc; | 31 | return rc; |
33 | } | 32 | } |
34 | fini_cc_regs(drvdata); | 33 | fini_cc_regs(drvdata); |
34 | cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_ENABLE); | ||
35 | cc_clk_off(drvdata); | 35 | cc_clk_off(drvdata); |
36 | return 0; | 36 | return 0; |
37 | } | 37 | } |