]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: renesas: rzg2l-cpg: Move PM domain power on in rzg2l_cpg_pd_setup()
authorClaudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Tue, 15 Oct 2024 16:47:29 +0000 (19:47 +0300)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Fri, 25 Oct 2024 08:59:38 +0000 (10:59 +0200)
commitb739073af44ef8c35f633570c5d86d94721ab1e3
tree25109e6bb12528b1264810ade0f008e1984e202a
parent92850bed9d4d334ee502a035ed5750285faccbea
clk: renesas: rzg2l-cpg: Move PM domain power on in rzg2l_cpg_pd_setup()

Move the PM domain power on in rzg2l_cpg_pd_setup(). With this the
previously always-on power domains got
struct generic_pm_domain::{power_on, power_off} populated (and
registered with simple_qos_governor if #power-domain-cells = <1> and
with pm_domain_always_on_gov if #power-domain-cells = <0>). The values for
struct generic_pm_domain::{power_on, power_off} are now populated for
all registered domains but used by core only for the domains that can
use them (the PM domain should be non always-on and registered with
simple_qos_governor). Moreover, the power on/off functions check if the
mstop support is valid. The mstop is populated only by the RZ/G3S
initialization code at the moment.

This approach was chosen to keep the code simple and use the same code
across different implementations. There should be no issues with this
approach as the always on domains are registered with GENPD_FLAG_ALWAYS_ON
and the PM domain core takes care of it.

This approach allows doing further cleanups on the rzg2l_cpg power domain
registering code that will be handled by the next commit.

Signed-off-by: Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Link: https://lore.kernel.org/20241015164732.4085249-2-claudiu.beznea.uj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/clk/renesas/rzg2l-cpg.c