[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z5iINvEVTXqqdXS6@linaro.org>
Date: Tue, 28 Jan 2025 08:33:10 +0100
From: Stephan Gerhold <stephan.gerhold@...aro.org>
To: Luca Weiss <luca@...aweiss.eu>
Cc: ~postmarketos/upstreaming@...ts.sr.ht, phone-devel@...r.kernel.org,
Bjorn Andersson <andersson@...nel.org>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Stephan Gerhold <stephan@...hold.net>,
Konrad Dybcio <konradybcio@...nel.org>,
Matti Lehtimäki <matti.lehtimaki@...il.com>,
linux-arm-msm@...r.kernel.org, linux-remoteproc@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 04/13] remoteproc: qcom_q6v5_mss: Handle platforms
with one power domain
On Mon, Jan 27, 2025 at 11:45:36PM +0100, Luca Weiss wrote:
> For example MSM8974 has mx voltage rail exposed as regulator and only cx
> voltage rail is exposed as power domain. This power domain (cx) is
> attached internally in power domain and cannot be attached in this driver.
>
> Fixes: 8750cf392394 ("remoteproc: qcom_q6v5_mss: Allow replacing regulators with power domains")
> Co-developed-by: Matti Lehtimäki <matti.lehtimaki@...il.com>
> Signed-off-by: Matti Lehtimäki <matti.lehtimaki@...il.com>
> Signed-off-by: Luca Weiss <luca@...aweiss.eu>
Reviewed-by: Stephan Gerhold <stephan.gerhold@...aro.org>
> ---
> drivers/remoteproc/qcom_q6v5_mss.c | 20 +++++++++++++++++---
> 1 file changed, 17 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_mss.c b/drivers/remoteproc/qcom_q6v5_mss.c
> index e78bd986dc3f256effce4470222c0a5faeea86ec..0e1b0934ceedd13d5790b798afc95d68a8314c75 100644
> --- a/drivers/remoteproc/qcom_q6v5_mss.c
> +++ b/drivers/remoteproc/qcom_q6v5_mss.c
> @@ -1831,6 +1831,13 @@ static int q6v5_pds_attach(struct device *dev, struct device **devs,
> while (pd_names[num_pds])
> num_pds++;
>
> + /* Handle single power domain */
> + if (num_pds == 1 && dev->pm_domain) {
> + devs[0] = dev;
> + pm_runtime_enable(dev);
> + return 1;
> + }
> +
> for (i = 0; i < num_pds; i++) {
> devs[i] = dev_pm_domain_attach_by_name(dev, pd_names[i]);
> if (IS_ERR_OR_NULL(devs[i])) {
> @@ -1851,8 +1858,15 @@ static int q6v5_pds_attach(struct device *dev, struct device **devs,
> static void q6v5_pds_detach(struct q6v5 *qproc, struct device **pds,
> size_t pd_count)
> {
> + struct device *dev = qproc->dev;
> int i;
>
> + /* Handle single power domain */
> + if (pd_count == 1 && dev->pm_domain) {
> + pm_runtime_disable(dev);
> + return;
> + }
> +
> for (i = 0; i < pd_count; i++)
> dev_pm_domain_detach(pds[i], false);
> }
> @@ -2449,13 +2463,13 @@ static const struct rproc_hexagon_res msm8974_mss = {
> .supply = "pll",
> .uA = 100000,
> },
> - {}
> - },
> - .fallback_proxy_supply = (struct qcom_mss_reg_res[]) {
> {
> .supply = "mx",
> .uV = 1050000,
> },
> + {}
> + },
> + .fallback_proxy_supply = (struct qcom_mss_reg_res[]) {
> {
> .supply = "cx",
> .uA = 100000,
>
> --
> 2.48.1
>
Powered by blists - more mailing lists