aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pmdomain
diff options
context:
space:
mode:
authorxianwei.zhao <xianwei.zhao@amlogic.com>2023-09-11 10:52:20 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2023-09-14 00:10:28 +0200
commit0a7bd33c996893cff1d1e680c9ea7f9c90b12560 (patch)
tree7d1a669db0955022968659b3890ec56a8733b2c1 /drivers/pmdomain
parentefa529b31afe50b88f26a529352c8213e82d61be (diff)
downloadlinux-0a7bd33c996893cff1d1e680c9ea7f9c90b12560.tar.gz
pmdomain: amlogic: init power domain state
If initial power domain with 'AWAY_ON' property state is off, turn on the power. Signed-off-by: xianwei.zhao <xianwei.zhao@amlogic.com> Link: https://lore.kernel.org/r/20230911025223.3433776-4-xianwei.zhao@amlogic.com [Ulf: Re-based to fit the pmdomain subsystem] Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/pmdomain')
-rw-r--r--drivers/pmdomain/amlogic/meson-secure-pwrc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/pmdomain/amlogic/meson-secure-pwrc.c b/drivers/pmdomain/amlogic/meson-secure-pwrc.c
index ecada537b19c96..d751c224048dc6 100644
--- a/drivers/pmdomain/amlogic/meson-secure-pwrc.c
+++ b/drivers/pmdomain/amlogic/meson-secure-pwrc.c
@@ -222,6 +222,9 @@ static int meson_secure_pwrc_probe(struct platform_device *pdev)
dom->base.power_on = meson_secure_pwrc_on;
dom->base.power_off = meson_secure_pwrc_off;
+ if (match->domains[i].is_off(dom) && (dom->base.flags & GENPD_FLAG_ALWAYS_ON))
+ meson_secure_pwrc_on(&dom->base);
+
pm_genpd_init(&dom->base, NULL, match->domains[i].is_off(dom));
pwrc->xlate.domains[i] = &dom->base;