diff options
author | Ofir Drang <ofir.drang@arm.com> | 2019-04-18 16:39:06 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-05-22 07:37:39 +0200 |
commit | 1a4fc3d29632fe86ee461dee9ca8ab26aaa95806 (patch) | |
tree | 0bd97698b92efd9c4fadf8538945131055717093 /drivers/crypto | |
parent | 120ab825c6fd3d6589a9dc056273b5f265e766f5 (diff) | |
download | linux-stable-1a4fc3d29632fe86ee461dee9ca8ab26aaa95806.tar.gz linux-stable-1a4fc3d29632fe86ee461dee9ca8ab26aaa95806.tar.bz2 linux-stable-1a4fc3d29632fe86ee461dee9ca8ab26aaa95806.zip |
crypto: ccree - pm resume first enable the source clk
commit 7766dd774d80463cec7b81d90c8672af91de2da1 upstream.
On power management resume function first enable the device clk source
to allow access to the device registers.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/crypto')
-rw-r--r-- | drivers/crypto/ccree/cc_pm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/crypto/ccree/cc_pm.c b/drivers/crypto/ccree/cc_pm.c index d990f472e89f..d433804dead3 100644 --- a/drivers/crypto/ccree/cc_pm.c +++ b/drivers/crypto/ccree/cc_pm.c @@ -42,14 +42,15 @@ int cc_pm_resume(struct device *dev) struct cc_drvdata *drvdata = dev_get_drvdata(dev); dev_dbg(dev, "unset HOST_POWER_DOWN_EN\n"); - cc_iowrite(drvdata, CC_REG(HOST_POWER_DOWN_EN), POWER_DOWN_DISABLE); - + /* Enables the device source clk */ rc = cc_clk_on(drvdata); if (rc) { dev_err(dev, "failed getting clock back on. We're toast.\n"); return rc; } + 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); |