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>
Tento commit je obsažen v:

odevzdal
Herbert Xu

rodič
1a895f1d5b
revize
8c7849a302
@@ -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;
|
||||
|
Odkázat v novém úkolu
Zablokovat Uživatele