* [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs
@ 2025-11-29 1:32 Alexandru Gagniuc
2025-11-29 1:32 ` [PATCH 2/2] remoteproc: qcom_q6v5_wcss: use optional reset for wcss_q6_bcr_reset Alexandru Gagniuc
2025-11-29 21:18 ` [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs Bjorn Andersson
0 siblings, 2 replies; 8+ messages in thread
From: Alexandru Gagniuc @ 2025-11-29 1:32 UTC (permalink / raw)
To: andersson, mathieu.poirier, linux-arm-msm, linux-remoteproc
Cc: p.zabel, linux-kernel, Alexandru Gagniuc
The "qcom,halt-regs" consists of a phandle reference followed by the
three offsets within syscon for halt registers. Thus, we need to
request 4 integers from of_property_read_variable_u32_array(), with
the halt_reg ofsets at indexes 1, 2, and 3. Offset 0 is the phandle.
With MAX_HALT_REG at 3, of_property_read_variable_u32_array() returns
-EOVERFLOW, causing .probe() to fail.
Increase MAX_HALT_REG to 4, and update the indexes accordingly.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
---
drivers/remoteproc/qcom_q6v5_wcss.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
index 07c88623f5978..23ec87827d4f8 100644
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -85,7 +85,7 @@
#define TCSR_WCSS_CLK_MASK 0x1F
#define TCSR_WCSS_CLK_ENABLE 0x14
-#define MAX_HALT_REG 3
+#define MAX_HALT_REG 4
enum {
WCSS_IPQ8074,
WCSS_QCS404,
@@ -864,9 +864,9 @@ static int q6v5_wcss_init_mmio(struct q6v5_wcss *wcss,
return -EINVAL;
}
- wcss->halt_q6 = halt_reg[0];
- wcss->halt_wcss = halt_reg[1];
- wcss->halt_nc = halt_reg[2];
+ wcss->halt_q6 = halt_reg[1];
+ wcss->halt_wcss = halt_reg[2];
+ wcss->halt_nc = halt_reg[3];
return 0;
}
--
2.45.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] remoteproc: qcom_q6v5_wcss: use optional reset for wcss_q6_bcr_reset
2025-11-29 1:32 [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs Alexandru Gagniuc
@ 2025-11-29 1:32 ` Alexandru Gagniuc
2025-12-01 11:21 ` Konrad Dybcio
2025-11-29 21:18 ` [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs Bjorn Andersson
1 sibling, 1 reply; 8+ messages in thread
From: Alexandru Gagniuc @ 2025-11-29 1:32 UTC (permalink / raw)
To: andersson, mathieu.poirier, linux-arm-msm, linux-remoteproc,
Philipp Zabel
Cc: linux-kernel, Alexandru Gagniuc
The "wcss_q6_bcr_reset" is not used on IPQ8074, and IPQ6018. Use
devm_reset_control_get_optional_exclusive() for this reset so that
probe() does not fail on platforms where it is not used.
Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
---
drivers/remoteproc/qcom_q6v5_wcss.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
index 23ec87827d4f8..6e28744ce3f75 100644
--- a/drivers/remoteproc/qcom_q6v5_wcss.c
+++ b/drivers/remoteproc/qcom_q6v5_wcss.c
@@ -811,7 +811,8 @@ static int q6v5_wcss_init_reset(struct q6v5_wcss *wcss,
}
}
- wcss->wcss_q6_bcr_reset = devm_reset_control_get_exclusive(dev, "wcss_q6_bcr_reset");
+ wcss->wcss_q6_bcr_reset = devm_reset_control_get_optional_exclusive(dev,
+ "wcss_q6_bcr_reset");
if (IS_ERR(wcss->wcss_q6_bcr_reset)) {
dev_err(wcss->dev, "unable to acquire wcss_q6_bcr_reset\n");
return PTR_ERR(wcss->wcss_q6_bcr_reset);
--
2.45.1
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs
2025-11-29 1:32 [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs Alexandru Gagniuc
2025-11-29 1:32 ` [PATCH 2/2] remoteproc: qcom_q6v5_wcss: use optional reset for wcss_q6_bcr_reset Alexandru Gagniuc
@ 2025-11-29 21:18 ` Bjorn Andersson
2025-12-06 2:19 ` Alex G.
1 sibling, 1 reply; 8+ messages in thread
From: Bjorn Andersson @ 2025-11-29 21:18 UTC (permalink / raw)
To: Alexandru Gagniuc
Cc: mathieu.poirier, linux-arm-msm, linux-remoteproc, p.zabel,
linux-kernel
On Fri, Nov 28, 2025 at 07:32:05PM -0600, Alexandru Gagniuc wrote:
> The "qcom,halt-regs" consists of a phandle reference followed by the
> three offsets within syscon for halt registers. Thus, we need to
> request 4 integers from of_property_read_variable_u32_array(), with
> the halt_reg ofsets at indexes 1, 2, and 3. Offset 0 is the phandle.
>
> With MAX_HALT_REG at 3, of_property_read_variable_u32_array() returns
> -EOVERFLOW, causing .probe() to fail.
>
> Increase MAX_HALT_REG to 4, and update the indexes accordingly.
>
Good catch, thanks
Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404")
Regards,
Bjorn
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
> ---
> drivers/remoteproc/qcom_q6v5_wcss.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
> index 07c88623f5978..23ec87827d4f8 100644
> --- a/drivers/remoteproc/qcom_q6v5_wcss.c
> +++ b/drivers/remoteproc/qcom_q6v5_wcss.c
> @@ -85,7 +85,7 @@
> #define TCSR_WCSS_CLK_MASK 0x1F
> #define TCSR_WCSS_CLK_ENABLE 0x14
>
> -#define MAX_HALT_REG 3
> +#define MAX_HALT_REG 4
> enum {
> WCSS_IPQ8074,
> WCSS_QCS404,
> @@ -864,9 +864,9 @@ static int q6v5_wcss_init_mmio(struct q6v5_wcss *wcss,
> return -EINVAL;
> }
>
> - wcss->halt_q6 = halt_reg[0];
> - wcss->halt_wcss = halt_reg[1];
> - wcss->halt_nc = halt_reg[2];
> + wcss->halt_q6 = halt_reg[1];
> + wcss->halt_wcss = halt_reg[2];
> + wcss->halt_nc = halt_reg[3];
>
> return 0;
> }
> --
> 2.45.1
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] remoteproc: qcom_q6v5_wcss: use optional reset for wcss_q6_bcr_reset
2025-11-29 1:32 ` [PATCH 2/2] remoteproc: qcom_q6v5_wcss: use optional reset for wcss_q6_bcr_reset Alexandru Gagniuc
@ 2025-12-01 11:21 ` Konrad Dybcio
2025-12-01 21:04 ` mr.nuke.me
0 siblings, 1 reply; 8+ messages in thread
From: Konrad Dybcio @ 2025-12-01 11:21 UTC (permalink / raw)
To: Alexandru Gagniuc, andersson, mathieu.poirier, linux-arm-msm,
linux-remoteproc, Philipp Zabel
Cc: linux-kernel
On 11/29/25 2:32 AM, Alexandru Gagniuc wrote:
> The "wcss_q6_bcr_reset" is not used on IPQ8074, and IPQ6018. Use
> devm_reset_control_get_optional_exclusive() for this reset so that
> probe() does not fail on platforms where it is not used.
>
> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
> ---
This reset is not even used (or documented anywhere).. the closest
I can find is "wcss_q6_reset" in qcom,q6v5.txt, initially documented
in:
Fixes: 3a3d4163e0bf ("remoteproc: qcom: Introduce Hexagon V5 based WCSS driver")
which claims it was made for.. IPQ8074
Peeking at the GCC driver, this reset is most likely present as
GCC_WCSS_Q6_BCR
Konrad
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] remoteproc: qcom_q6v5_wcss: use optional reset for wcss_q6_bcr_reset
2025-12-01 11:21 ` Konrad Dybcio
@ 2025-12-01 21:04 ` mr.nuke.me
2025-12-02 13:33 ` Konrad Dybcio
0 siblings, 1 reply; 8+ messages in thread
From: mr.nuke.me @ 2025-12-01 21:04 UTC (permalink / raw)
To: Konrad Dybcio, andersson, mathieu.poirier, linux-arm-msm,
linux-remoteproc, Philipp Zabel
Cc: linux-kernel
On 12/1/25 5:21 AM, Konrad Dybcio wrote:
> On 11/29/25 2:32 AM, Alexandru Gagniuc wrote:
>> The "wcss_q6_bcr_reset" is not used on IPQ8074, and IPQ6018. Use
>> devm_reset_control_get_optional_exclusive() for this reset so that
>> probe() does not fail on platforms where it is not used.
>>
>> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
>> ---
>
> This reset is not even used (or documented anywhere).. the closest
> I can find is "wcss_q6_reset" in qcom,q6v5.txt, initially documented
> in:
>
> Fixes: 3a3d4163e0bf ("remoteproc: qcom: Introduce Hexagon V5 based WCSS driver")
>
> which claims it was made for.. IPQ8074
>
> Peeking at the GCC driver, this reset is most likely present as
> GCC_WCSS_Q6_BCR
The downstream kernel uses GCC_WCSS_Q6_BCR for ipq8074 [1] and ipq6018 [2].
They only use of ->wcss_q6_bcr_reset in the QCN404 path, which does not use
->wcss_q6_reset. So maybe we can get away with calling it "wcss_q6_reset",
store the pointer in ->wcss_q6_reset, and drop '.wcss_q6_reset_required'
Which path do you think is the most appropriate?
Alex
[1] https://git.codelinaro.org/clo/qsdk/oss/kernel/linux-ipq-5.4/-/blob/NHSS.QSDK.12.5.r5/arch/arm64/boot/dts/qcom/ipq8074.dtsi?ref_type=heads#L1060
[2] https://git.codelinaro.org/clo/qsdk/oss/kernel/linux-ipq-5.4/-/blob/NHSS.QSDK.12.5.r5/arch/arm64/boot/dts/qcom/ipq6018.dtsi?ref_type=heads#L1440
[3] https://git.codelinaro.org/clo/qsdk/oss/kernel/linux-ipq-5.4/-/blob/NHSS.QSDK.12.5.r5/drivers/remoteproc/qcom_q6v5_wcss.c#L967
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] remoteproc: qcom_q6v5_wcss: use optional reset for wcss_q6_bcr_reset
2025-12-01 21:04 ` mr.nuke.me
@ 2025-12-02 13:33 ` Konrad Dybcio
0 siblings, 0 replies; 8+ messages in thread
From: Konrad Dybcio @ 2025-12-02 13:33 UTC (permalink / raw)
To: mr.nuke.me, andersson, mathieu.poirier, linux-arm-msm,
linux-remoteproc, Philipp Zabel
Cc: linux-kernel
On 12/1/25 10:04 PM, mr.nuke.me@gmail.com wrote:
> On 12/1/25 5:21 AM, Konrad Dybcio wrote:
>> On 11/29/25 2:32 AM, Alexandru Gagniuc wrote:
>>> The "wcss_q6_bcr_reset" is not used on IPQ8074, and IPQ6018. Use
>>> devm_reset_control_get_optional_exclusive() for this reset so that
>>> probe() does not fail on platforms where it is not used.
>>>
>>> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
>>> ---
>>
>> This reset is not even used (or documented anywhere).. the closest
>> I can find is "wcss_q6_reset" in qcom,q6v5.txt, initially documented
>> in:
>>
>> Fixes: 3a3d4163e0bf ("remoteproc: qcom: Introduce Hexagon V5 based WCSS driver")
>>
>> which claims it was made for.. IPQ8074
>>
>> Peeking at the GCC driver, this reset is most likely present as
>> GCC_WCSS_Q6_BCR
>
> The downstream kernel uses GCC_WCSS_Q6_BCR for ipq8074 [1] and ipq6018 [2].
> They only use of ->wcss_q6_bcr_reset in the QCN404 path, which does not use
> ->wcss_q6_reset. So maybe we can get away with calling it "wcss_q6_reset",
> store the pointer in ->wcss_q6_reset, and drop '.wcss_q6_reset_required'
"BCR reset" is like saying "PIN number", both of the ones you mentioned are
referring to the same thing
Konrad
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs
2025-11-29 21:18 ` [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs Bjorn Andersson
@ 2025-12-06 2:19 ` Alex G.
2025-12-06 3:35 ` Bjorn Andersson
0 siblings, 1 reply; 8+ messages in thread
From: Alex G. @ 2025-12-06 2:19 UTC (permalink / raw)
To: Bjorn Andersson
Cc: mathieu.poirier, linux-arm-msm, linux-remoteproc, p.zabel,
linux-kernel, konrad.dybcio
On 11/29/25 3:18 PM, Bjorn Andersson wrote:
> On Fri, Nov 28, 2025 at 07:32:05PM -0600, Alexandru Gagniuc wrote:
>> The "qcom,halt-regs" consists of a phandle reference followed by th
>> three offsets within syscon for halt registers. Thus, we need to
>> request 4 integers from of_property_read_variable_u32_array(), with
>> the halt_reg ofsets at indexes 1, 2, and 3. Offset 0 is the phandle.
>>
>> With MAX_HALT_REG at 3, of_property_read_variable_u32_array() returns
>> -EOVERFLOW, causing .probe() to fail.
>>
>> Increase MAX_HALT_REG to 4, and update the indexes accordingly.
>>
>
> Good catch, thanks
>
> Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404")
Hi Bjorn,
I noticed that v1 of this series is included in the pull for v6.19 [1],
even though there is a v2 [2] with some of your and Konrad's feedback
included. I wanted to check if this is your intention. I am okay to go
with v1, and am happy to submit any further improvements after the merge
window.
Alex
[1]
https://lore.kernel.org/linux-remoteproc/20251205200342.119676-1-andersson@kernel.org/T/#u
[2]
lore.kernel.org/linux-remoteproc/20251202162626.1135615-1-mr.nuke.me@gmail.com/#r>
Regards,
> Bjorn
>
>> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
>> ---
>> drivers/remoteproc/qcom_q6v5_wcss.c | 8 ++++----
>> 1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
>> index 07c88623f5978..23ec87827d4f8 100644
>> --- a/drivers/remoteproc/qcom_q6v5_wcss.c
>> +++ b/drivers/remoteproc/qcom_q6v5_wcss.c
>> @@ -85,7 +85,7 @@
>> #define TCSR_WCSS_CLK_MASK 0x1F
>> #define TCSR_WCSS_CLK_ENABLE 0x14
>>
>> -#define MAX_HALT_REG 3
>> +#define MAX_HALT_REG 4
>> enum {
>> WCSS_IPQ8074,
>> WCSS_QCS404,
>> @@ -864,9 +864,9 @@ static int q6v5_wcss_init_mmio(struct q6v5_wcss *wcss,
>> return -EINVAL;
>> }
>>
>> - wcss->halt_q6 = halt_reg[0];
>> - wcss->halt_wcss = halt_reg[1];
>> - wcss->halt_nc = halt_reg[2];
>> + wcss->halt_q6 = halt_reg[1];
>> + wcss->halt_wcss = halt_reg[2];
>> + wcss->halt_nc = halt_reg[3];
>>
>> return 0;
>> }
>> --
>> 2.45.1
>>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs
2025-12-06 2:19 ` Alex G.
@ 2025-12-06 3:35 ` Bjorn Andersson
0 siblings, 0 replies; 8+ messages in thread
From: Bjorn Andersson @ 2025-12-06 3:35 UTC (permalink / raw)
To: Alex G.
Cc: mathieu.poirier, linux-arm-msm, linux-remoteproc, p.zabel,
linux-kernel, konrad.dybcio
On Fri, Dec 05, 2025 at 08:19:57PM -0600, Alex G. wrote:
> On 11/29/25 3:18 PM, Bjorn Andersson wrote:
> > On Fri, Nov 28, 2025 at 07:32:05PM -0600, Alexandru Gagniuc wrote:
> > > The "qcom,halt-regs" consists of a phandle reference followed by th
> > > three offsets within syscon for halt registers. Thus, we need to
> > > request 4 integers from of_property_read_variable_u32_array(), with
> > > the halt_reg ofsets at indexes 1, 2, and 3. Offset 0 is the phandle.
> > >
> > > With MAX_HALT_REG at 3, of_property_read_variable_u32_array() returns
> > > -EOVERFLOW, causing .probe() to fail.
> > >
> > > Increase MAX_HALT_REG to 4, and update the indexes accordingly.
> > >
> >
> > Good catch, thanks
> >
> > Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404")
>
> Hi Bjorn,
>
> I noticed that v1 of this series is included in the pull for v6.19 [1], even
> though there is a v2 [2] with some of your and Konrad's feedback included. I
> wanted to check if this is your intention. I am okay to go with v1, and am
> happy to submit any further improvements after the merge window.
>
That's strange, I should have sent you a "thank you" email when I
applied it. I added my Fixes, and must have missed Konrad's input (or it
hadn't shown up yet?)
Without looking at Konrad's feedback, please send a new patch on top of
what I did merge if the changes would be beneficial.
Thanks,
Bjorn
> Alex
>
> [1] https://lore.kernel.org/linux-remoteproc/20251205200342.119676-1-andersson@kernel.org/T/#u
> [2] lore.kernel.org/linux-remoteproc/20251202162626.1135615-1-mr.nuke.me@gmail.com/#r>
> Regards,
> > Bjorn
> >
> > > Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
> > > ---
> > > drivers/remoteproc/qcom_q6v5_wcss.c | 8 ++++----
> > > 1 file changed, 4 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/drivers/remoteproc/qcom_q6v5_wcss.c b/drivers/remoteproc/qcom_q6v5_wcss.c
> > > index 07c88623f5978..23ec87827d4f8 100644
> > > --- a/drivers/remoteproc/qcom_q6v5_wcss.c
> > > +++ b/drivers/remoteproc/qcom_q6v5_wcss.c
> > > @@ -85,7 +85,7 @@
> > > #define TCSR_WCSS_CLK_MASK 0x1F
> > > #define TCSR_WCSS_CLK_ENABLE 0x14
> > > -#define MAX_HALT_REG 3
> > > +#define MAX_HALT_REG 4
> > > enum {
> > > WCSS_IPQ8074,
> > > WCSS_QCS404,
> > > @@ -864,9 +864,9 @@ static int q6v5_wcss_init_mmio(struct q6v5_wcss *wcss,
> > > return -EINVAL;
> > > }
> > > - wcss->halt_q6 = halt_reg[0];
> > > - wcss->halt_wcss = halt_reg[1];
> > > - wcss->halt_nc = halt_reg[2];
> > > + wcss->halt_q6 = halt_reg[1];
> > > + wcss->halt_wcss = halt_reg[2];
> > > + wcss->halt_nc = halt_reg[3];
> > > return 0;
> > > }
> > > --
> > > 2.45.1
> > >
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2025-12-06 3:28 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-29 1:32 [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs Alexandru Gagniuc
2025-11-29 1:32 ` [PATCH 2/2] remoteproc: qcom_q6v5_wcss: use optional reset for wcss_q6_bcr_reset Alexandru Gagniuc
2025-12-01 11:21 ` Konrad Dybcio
2025-12-01 21:04 ` mr.nuke.me
2025-12-02 13:33 ` Konrad Dybcio
2025-11-29 21:18 ` [PATCH 1/2] remoteproc: qcom_q6v5_wcss: fix parsing of qcom,halt-regs Bjorn Andersson
2025-12-06 2:19 ` Alex G.
2025-12-06 3:35 ` Bjorn Andersson
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).