Commit 3499efbe authored by Ofir Drang's avatar Ofir Drang Committed by Herbert Xu

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: default avatarOfir Drang <ofir.drang@arm.com>
Signed-off-by: default avatarGilad Ben-Yossef <gilad@benyossef.com>
Cc: stable@vger.kernel.org # v4.19+
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 1fc16572
...@@ -25,13 +25,13 @@ int cc_pm_suspend(struct device *dev) ...@@ -25,13 +25,13 @@ int cc_pm_suspend(struct device *dev)
int rc; int rc;
dev_dbg(dev, "set HOST_POWER_DOWN_EN\n"); dev_dbg(dev, "set HOST_POWER_DOWN_EN\n");
cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_ENABLE);
rc = cc_suspend_req_queue(drvdata); rc = cc_suspend_req_queue(drvdata);
if (rc) { if (rc) {
dev_err(dev, "cc_suspend_req_queue (%x)\n", rc); dev_err(dev, "cc_suspend_req_queue (%x)\n", rc);
return rc; return rc;
} }
fini_cc_regs(drvdata); fini_cc_regs(drvdata);
cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_ENABLE);
cc_clk_off(drvdata); cc_clk_off(drvdata);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment