summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/ccree/cc_pm.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert+renesas@glider.be>2020-02-11 19:19:08 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2020-02-22 02:25:44 +0100
commit8c7849a30255cfd9a9ba412b1517e20a8572448b (patch)
tree26dc1058b4bb604002ca761bcbfd6d208f3402a2 /drivers/crypto/ccree/cc_pm.h
parentcrypto: ccree - use u32 for SRAM addresses (diff)
downloadlinux-8c7849a30255cfd9a9ba412b1517e20a8572448b.tar.xz
linux-8c7849a30255cfd9a9ba412b1517e20a8572448b.zip
crypto: ccree - simplify Runtime PM handling
Currently, a large part of the probe function runs before Runtime PM is enabled. As the driver manages the device's clock manually, this may work fine on some systems, but may break on platforms with a more complex power hierarchy. Fix this by moving the initialization of Runtime PM before the first register access (in cc_wait_for_reset_completion()), and putting the device to sleep only after the last access (in cc_set_ree_fips_status()). This allows to remove the pm_on flag, which was used to track manually if Runtime PM had been enabled or not. Remove the cc_pm_{init,go,fini}() wrappers, as they are called only once, and obscure operation. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/ccree/cc_pm.h')
-rw-r--r--drivers/crypto/ccree/cc_pm.h12
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/crypto/ccree/cc_pm.h b/drivers/crypto/ccree/cc_pm.h
index 80a18e11cae4..2dcf53fa108e 100644
--- a/drivers/crypto/ccree/cc_pm.h
+++ b/drivers/crypto/ccree/cc_pm.h
@@ -15,9 +15,6 @@
extern const struct dev_pm_ops ccree_pm;
-int cc_pm_init(struct cc_drvdata *drvdata);
-void cc_pm_go(struct cc_drvdata *drvdata);
-void cc_pm_fini(struct cc_drvdata *drvdata);
int cc_pm_suspend(struct device *dev);
int cc_pm_resume(struct device *dev);
int cc_pm_get(struct device *dev);
@@ -26,15 +23,6 @@ bool cc_pm_is_dev_suspended(struct device *dev);
#else
-static inline int cc_pm_init(struct cc_drvdata *drvdata)
-{
- return 0;
-}
-
-static inline void cc_pm_go(struct cc_drvdata *drvdata) {}
-
-static inline void cc_pm_fini(struct cc_drvdata *drvdata) {}
-
static inline int cc_pm_get(struct device *dev)
{
return 0;