linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] remoteproc: qcom: wcnss: Fix handling of IRQs
       [not found] <20220510042654.71152-1-sireeshkodali1@gmail.com>
@ 2022-05-10  4:26 ` Sireesh Kodali
  2022-05-10  4:26 ` [PATCH 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node Sireesh Kodali
  1 sibling, 0 replies; 5+ messages in thread
From: Sireesh Kodali @ 2022-05-10  4:26 UTC (permalink / raw)
  To: devicetree, linux-arm-msm, linux-remoteproc
  Cc: bjorn.andersson, Sireesh Kodali, Andy Gross, Mathieu Poirier, open list

The wcnss_get_irq function is expected to return a value > 0 in the
event that an IRQ is succssfully obtained, but it instead returns 0.
This causes the stop and ready IRQs to never actually be used despite
being defined in the device-tree. This patch fixes that.

Fixes: aed361adca9f ("remoteproc: qcom: Introduce WCNSS peripheral image loader")

Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>
---
 drivers/remoteproc/qcom_wcnss.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/remoteproc/qcom_wcnss.c b/drivers/remoteproc/qcom_wcnss.c
index 9a223d394087..68f37296b151 100644
--- a/drivers/remoteproc/qcom_wcnss.c
+++ b/drivers/remoteproc/qcom_wcnss.c
@@ -467,6 +467,7 @@ static int wcnss_request_irq(struct qcom_wcnss *wcnss,
 			     irq_handler_t thread_fn)
 {
 	int ret;
+	int irq_number;
 
 	ret = platform_get_irq_byname(pdev, name);
 	if (ret < 0 && optional) {
@@ -477,14 +478,19 @@ static int wcnss_request_irq(struct qcom_wcnss *wcnss,
 		return ret;
 	}
 
+	irq_number = ret;
+
 	ret = devm_request_threaded_irq(&pdev->dev, ret,
 					NULL, thread_fn,
 					IRQF_TRIGGER_RISING | IRQF_ONESHOT,
 					"wcnss", wcnss);
-	if (ret)
+	if (ret) {
 		dev_err(&pdev->dev, "request %s IRQ failed\n", name);
+		return ret;
+	}
 
-	return ret;
+	/* Return the IRQ number if the IRQ was successfully acquired */
+	return irq_number;
 }
 
 static int wcnss_alloc_memory_region(struct qcom_wcnss *wcnss)
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
       [not found] <20220510042654.71152-1-sireeshkodali1@gmail.com>
  2022-05-10  4:26 ` [PATCH 1/2] remoteproc: qcom: wcnss: Fix handling of IRQs Sireesh Kodali
@ 2022-05-10  4:26 ` Sireesh Kodali
  2022-05-11 17:51   ` Stephan Gerhold
  2022-05-11 18:11   ` Krzysztof Kozlowski
  1 sibling, 2 replies; 5+ messages in thread
From: Sireesh Kodali @ 2022-05-10  4:26 UTC (permalink / raw)
  To: devicetree, linux-arm-msm, linux-remoteproc
  Cc: bjorn.andersson, Sireesh Kodali, Andy Gross, Rob Herring,
	Krzysztof Kozlowski, open list

The smem-state properties for the pronto node were incorrectly labelled,
reading `qcom,state*` rather than `qcom,smem-state*`. Fix that, allowing
the stop state to be used.

Fixes: 88106096cbf8 ("ARM: dts: msm8916: Add and enable wcnss node")

Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>
---
 arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
index e34963505e07..7ecd747dc624 100644
--- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
@@ -1758,8 +1758,8 @@ pronto: remoteproc@a21b000 {
 					<&rpmpd MSM8916_VDDMX>;
 			power-domain-names = "cx", "mx";
 
-			qcom,state = <&wcnss_smp2p_out 0>;
-			qcom,state-names = "stop";
+			qcom,smem-states = <&wcnss_smp2p_out 0>;
+			qcom,smem-state-names = "stop";
 
 			pinctrl-names = "default";
 			pinctrl-0 = <&wcnss_pin_a>;
-- 
2.36.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
  2022-05-10  4:26 ` [PATCH 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node Sireesh Kodali
@ 2022-05-11 17:51   ` Stephan Gerhold
  2022-05-11 18:11   ` Krzysztof Kozlowski
  1 sibling, 0 replies; 5+ messages in thread
From: Stephan Gerhold @ 2022-05-11 17:51 UTC (permalink / raw)
  To: Sireesh Kodali
  Cc: devicetree, linux-arm-msm, linux-remoteproc, bjorn.andersson,
	Andy Gross, Rob Herring, Krzysztof Kozlowski, open list

On Tue, May 10, 2022 at 09:56:54AM +0530, Sireesh Kodali wrote:
> The smem-state properties for the pronto node were incorrectly labelled,
> reading `qcom,state*` rather than `qcom,smem-state*`. Fix that, allowing
> the stop state to be used.
> 
> Fixes: 88106096cbf8 ("ARM: dts: msm8916: Add and enable wcnss node")
> 
> Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>

Thanks for finding this!

Reviewed-by: Stephan Gerhold <stephan@gerhold.net>

> ---
>  arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> index e34963505e07..7ecd747dc624 100644
> --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi
> +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi
> @@ -1758,8 +1758,8 @@ pronto: remoteproc@a21b000 {
>  					<&rpmpd MSM8916_VDDMX>;
>  			power-domain-names = "cx", "mx";
>  
> -			qcom,state = <&wcnss_smp2p_out 0>;
> -			qcom,state-names = "stop";
> +			qcom,smem-states = <&wcnss_smp2p_out 0>;
> +			qcom,smem-state-names = "stop";
>  
>  			pinctrl-names = "default";
>  			pinctrl-0 = <&wcnss_pin_a>;
> -- 
> 2.36.0
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
  2022-05-10  4:26 ` [PATCH 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node Sireesh Kodali
  2022-05-11 17:51   ` Stephan Gerhold
@ 2022-05-11 18:11   ` Krzysztof Kozlowski
  2022-05-12  9:37     ` Sireesh Kodali
  1 sibling, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2022-05-11 18:11 UTC (permalink / raw)
  To: Sireesh Kodali, devicetree, linux-arm-msm, linux-remoteproc
  Cc: bjorn.andersson, Andy Gross, Rob Herring, Krzysztof Kozlowski, open list

On 10/05/2022 06:26, Sireesh Kodali wrote:
> The smem-state properties for the pronto node were incorrectly labelled,
> reading `qcom,state*` rather than `qcom,smem-state*`. Fix that, allowing
> the stop state to be used.
> 
> Fixes: 88106096cbf8 ("ARM: dts: msm8916: Add and enable wcnss node")
> 
> Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>

No blank lines between tags, please.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
  2022-05-11 18:11   ` Krzysztof Kozlowski
@ 2022-05-12  9:37     ` Sireesh Kodali
  0 siblings, 0 replies; 5+ messages in thread
From: Sireesh Kodali @ 2022-05-12  9:37 UTC (permalink / raw)
  To: Krzysztof Kozlowski, devicetree, linux-arm-msm, linux-remoteproc
  Cc: bjorn.andersson, Andy Gross, Rob Herring, Krzysztof Kozlowski, open list

On Wed May 11, 2022 at 11:41 PM IST, Krzysztof Kozlowski wrote:
> On 10/05/2022 06:26, Sireesh Kodali wrote:
> > The smem-state properties for the pronto node were incorrectly labelled,
> > reading `qcom,state*` rather than `qcom,smem-state*`. Fix that, allowing
> > the stop state to be used.
> > 
> > Fixes: 88106096cbf8 ("ARM: dts: msm8916: Add and enable wcnss node")
> > 
> > Signed-off-by: Sireesh Kodali <sireeshkodali1@gmail.com>
>
> No blank lines between tags, please.
>
> Best regards,
> Krzysztof

Will fix in v2

Thanks,
Sireesh

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-05-12  9:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220510042654.71152-1-sireeshkodali1@gmail.com>
2022-05-10  4:26 ` [PATCH 1/2] remoteproc: qcom: wcnss: Fix handling of IRQs Sireesh Kodali
2022-05-10  4:26 ` [PATCH 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node Sireesh Kodali
2022-05-11 17:51   ` Stephan Gerhold
2022-05-11 18:11   ` Krzysztof Kozlowski
2022-05-12  9:37     ` Sireesh Kodali

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).