remoteproc: qcom: Fix handling of WCNSS IRQs
Subsystems (4)
v2 cover remoteproc: qcom: Fix handling of WCNSS IRQs
Hi,
Due to a bug in the code that fetches the IRQs from the device tree, the optional "stop-ack" IRQ was never used, even if it was defined in the device tree. This also allowed a typo in the MSM8916 SoC device tree, where the "stop-ack" irq was instead labeled "stop".
The attached patches fix the handling of IRQs in the code, and fix the typo in the MSM8916 device tree.
Changes since v1:
* Dropped blank lines between tags in commit message
Sireesh Kodali (2):
remoteproc: qcom: wcnss: Fix handling of IRQs
arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- drivers/remoteproc/qcom_wcnss.c | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-)
Signature · 1 line
2.36.1
PATCH v2 1/2 remoteproc: qcom: wcnss: Fix handling of IRQs
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.
--- drivers/remoteproc/qcom_wcnss.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/remoteproc/qcom_wcnss.c +8 -2
@@ -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)
Signature · 1 line
2.36.1
PATCH v2 2/2 arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
In reply to Sireesh KodaliThe 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.
--- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/msm8916.dtsi +2 -2
@@ -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>;
Signature · 1 line
2.36.1
Re: [PATCH v2 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
Quoted 6 lines · Sireesh Kodali
The smem-state properties for the pronto node were incorrectly labelled, reading
qcom,state*rather thanqcom,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 <[email protected]>
My review didn't change just because of an unneeded blank line between the tags. Thanks again for finding this. :)
Quoted 22 lines
--- arch/arm64/boot/dts/qcom/msm8916.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm64/boot/dts/qcom/msm8916.dtsi +2
-2@@ -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>;Signature · 1 line
2.36.1
Re: [PATCH v2 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
In reply to Sireesh KodaliQuoted 6 lines · Sireesh Kodali
The smem-state properties for the pronto node were incorrectly labelled, reading
qcom,state*rather thanqcom,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 <[email protected]>
Include please acquired tags when sending a new version.
Best regards,
Krzysztof
Bjorn Andersson
AppliedQuoted 9 lines · Sireesh Kodali
Due to a bug in the code that fetches the IRQs from the device tree, the optional "stop-ack" IRQ was never used, even if it was defined in the device tree. This also allowed a typo in the MSM8916 SoC device tree, where the "stop-ack" irq was instead labeled "stop".
The attached patches fix the handling of IRQs in the code, and fix the typo in the MSM8916 device tree.
[...]
Applied, thanks!
[1/2] remoteproc: qcom: wcnss: Fix handling of IRQs
(no commit info)
[2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
commit: 5458d6f2827cd30218570f266b8d238417461f2f
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>
Bjorn Andersson
AppliedRe: (subset) [PATCH v2 2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
In reply to Sireesh KodaliQuoted 5 lines · Sireesh Kodali
The smem-state properties for the pronto node were incorrectly labelled, reading
qcom,state*rather thanqcom,smem-state*. Fix that, allowing the stop state to be used.
Applied, thanks!
[2/2] arm64: dts: qcom: msm8916: Fix typo in pronto remoteproc node
commit: 5458d6f2827cd30218570f266b8d238417461f2f
Best regards,
Signature · 1 line
Bjorn Andersson <[email protected]>