From: Xianwei Zhao <xianwei.zhao@amlogic.com>
To: <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-amlogic@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Cc: Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
xianwei.zhao <xianwei.zhao@amlogic.com>
Subject: [PATCH 3/6] soc: amlogic: init power domain state
Date: Thu, 17 Aug 2023 15:11:45 +0800 [thread overview]
Message-ID: <20230817071148.510575-4-xianwei.zhao@amlogic.com> (raw)
In-Reply-To: <20230817071148.510575-1-xianwei.zhao@amlogic.com>
From: "xianwei.zhao" <xianwei.zhao@amlogic.com>
If initial power domain with 'AWAY_ON' property state is off,
turn on the power.
Signed-off-by: xianwei.zhao <xianwei.zhao@amlogic.com>
---
drivers/genpd/amlogic/meson-secure-pwrc.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/genpd/amlogic/meson-secure-pwrc.c b/drivers/genpd/amlogic/meson-secure-pwrc.c
index 76527f4946b4..3e7e3bd25d1f 100644
--- a/drivers/genpd/amlogic/meson-secure-pwrc.c
+++ b/drivers/genpd/amlogic/meson-secure-pwrc.c
@@ -55,7 +55,7 @@ static bool pwrc_secure_is_off(struct meson_secure_pwrc_domain *pwrc_domain)
pwrc_domain->index, 0, 0, 0, 0) < 0)
pr_err("failed to get power domain status\n");
- return is_off;
+ return !!is_off;
}
static int meson_secure_pwrc_off(struct generic_pm_domain *domain)
@@ -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;
--
2.37.1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next prev parent reply other threads:[~2023-08-17 7:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-17 7:11 [PATCH 0/6] Power: T7: add power domain driver Xianwei Zhao
2023-08-17 7:11 ` [PATCH 1/6] soc: amlogic: modify some power domains property Xianwei Zhao
2023-08-17 7:11 ` [PATCH 2/6] soc: amlogic: add driver to support power parent node Xianwei Zhao
2023-08-17 7:11 ` Xianwei Zhao [this message]
2023-08-17 7:11 ` [PATCH 4/6] dt-bindings: power: add Amlogic T7 power domains Xianwei Zhao
2023-08-19 14:20 ` Krzysztof Kozlowski
2023-08-21 9:40 ` Xianwei Zhao
2023-08-17 7:11 ` [PATCH 5/6] soc: amlogic: Add support for T7 power domains controller Xianwei Zhao
2023-08-17 7:11 ` [PATCH 6/6] arm64: dts: add support for T7 power domain controller Xianwei Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230817071148.510575-4-xianwei.zhao@amlogic.com \
--to=xianwei.zhao@amlogic.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®