From: Stephan Gerhold <stephan@gerhold.net>
To: Sireesh Kodali <sireeshkodali1@gmail.com>
Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org,
linux-remoteproc@vger.kernel.org,
~postmarketos/upstreaming@lists.sr.ht,
linux-kernel@vger.kernel.org, andersson@kernel.org,
krzysztof.kozlowski+dt@linaro.org,
Vladimir Lypak <vladimir.lypak@gmail.com>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Konrad Dybcio <konrad.dybcio@somainline.org>,
Mathieu Poirier <mathieu.poirier@linaro.org>
Subject: Re: [PATCH v5 1/5] remoteproc: qcom: qcom_wcnss: Add support for pronto-v3
Date: Thu, 29 Sep 2022 11:39:41 +0200 [thread overview]
Message-ID: <YzVn3Q81bCo4l/aQ@gerhold.net> (raw)
In-Reply-To: <20220929050209.1464526-2-sireeshkodali1@gmail.com>
On Thu, Sep 29, 2022 at 10:32:05AM +0530, Sireesh Kodali wrote:
> From: Vladimir Lypak <vladimir.lypak@gmail.com>
>
> Pronto-v3 is similar to pronto-v2. It requires two power domains, and it
> requires the xo clock. It is used on the MSM8953 platform.
>
> Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
> Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>
> ---
> drivers/remoteproc/qcom_wcnss.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
>
> diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
> index 68f37296b151..ff18bfae5eb6 100644
> --- a/drivers/remoteproc/qcom_wcnss.c
> +++ b/drivers/remoteproc/qcom_wcnss.c
> @@ -141,6 +141,18 @@ static const struct wcnss_data pronto_v2_data = {
> .num_vregs = 1,
> };
>
> +static const struct wcnss_data pronto_v3_data = {
> + .pmu_offset = 0x1004,
> + .spare_offset = 0x1088,
> +
> + .pd_names = { "mx", "cx" },
> + .vregs = (struct wcnss_vreg_info[]) {
> + { "vddpx", 1800000, 1800000, 0 },
> + },
> + .num_pd_vregs = 2,
Can you try dropping this line? num_pd_vregs = 2 means:
"If power domains are specified in the device tree, skip the first two
entries in 'vregs'." For pronto-v1/v2 it would skip the "vddmx" and
"vddcx" entry, since those are already covered by the power domains.
However, since pronto-v3 should always have power domains in DT and
"vregs" has just a single entry this means that it would always access
the array out of bounds at runtime and request some garbage regulator.
I'm confused why this does not crash more spectacularly...
Thanks,
Stephan
> + .num_vregs = 1,
> +};
> +
> static int wcnss_load(struct rproc *rproc, const struct firmware *fw)
> {
> struct qcom_wcnss *wcnss = (struct qcom_wcnss *)rproc->priv;
> @@ -675,6 +687,7 @@ static const struct of_device_id wcnss_of_match[] = {
> { .compatible = "qcom,riva-pil", &riva_data },
> { .compatible = "qcom,pronto-v1-pil", &pronto_v1_data },
> { .compatible = "qcom,pronto-v2-pil", &pronto_v2_data },
> + { .compatible = "qcom,pronto-v3-pil", &pronto_v3_data },
> { },
> };
> MODULE_DEVICE_TABLE(of, wcnss_of_match);
> --
> 2.37.3
>
next prev parent reply other threads:[~2022-09-29 9:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-29 5:02 [PATCH v5 0/5] remoteproc: qcom: Add support for pronto-v3 Sireesh Kodali
2022-09-29 5:02 ` [PATCH v5 1/5] remoteproc: qcom: qcom_wcnss: " Sireesh Kodali
2022-09-29 9:39 ` Stephan Gerhold [this message]
2022-09-30 4:28 ` Sireesh Kodali
2022-09-29 5:02 ` [PATCH v5 2/5] dt-bindings: remoteproc: qcom: Convert wcnss documentation to YAML Sireesh Kodali
2022-09-29 9:18 ` Krzysztof Kozlowski
2022-09-29 5:02 ` [PATCH v5 3/5] dt-bindings: remoteproc: qcom: wcnss: Add qcom,pronto compatible Sireesh Kodali
2022-09-29 5:02 ` [PATCH v5 4/5] dt-bindings: remoteproc: qcom: wcnss: Add compatible for pronto v3 Sireesh Kodali
2022-09-29 5:02 ` [PATCH v5 5/5] dt-bindings: remoteproc: wcnss-pil: Make supplies optionally required Sireesh Kodali
2022-09-29 9:19 ` Krzysztof Kozlowski
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=YzVn3Q81bCo4l/aQ@gerhold.net \
--to=stephan@gerhold.net \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=konrad.dybcio@somainline.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=mathieu.poirier@linaro.org \
--cc=sireeshkodali1@gmail.com \
--cc=vladimir.lypak@gmail.com \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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;
as well as URLs for NNTP newsgroup(s).