diff mbox series

arm64: dts: qcom: msm8939: revert use of APCS mbox for RPM

Message ID 20240904-msm8939-rpm-apcs-fix-v1-1-b608e7e48fe1@linaro.org (mailing list archive)
State Accepted
Commit d92e9ea2f0f918d7b01cbacb838288bffccc8954
Headers show
Series arm64: dts: qcom: msm8939: revert use of APCS mbox for RPM | expand

Commit Message

Fabien Parent Sept. 4, 2024, 6:26 p.m. UTC
Commit 22e4e43484c4 ("arm64: dts: qcom: msm8939: Use mboxes
properties for APCS") broke the boot on msm8939 platforms.

The issue comes from the SMD driver failing to request the mbox
channel because of circular dependencies:
	1. rpm -> apcs1_mbox -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm.
	2. rpm -> apcs1_mbox -> gcc -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm
	3. rpm -> apcs1_mbox -> apcs2 -> gcc -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm

To fix this issue let's switch back to using the deprecated
qcom,ipc property for the RPM node.

Fixes: 22e4e43484c4 ("arm64: dts: qcom: msm8939: Use mboxes properties for APCS")
Signed-off-by: Fabien Parent <fabien.parent@linaro.org>
---
 arch/arm64/boot/dts/qcom/msm8939.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


---
base-commit: d8abb73f584772eaafa95a447c90f1c02dba0dec
change-id: 20240903-msm8939-rpm-apcs-fix-8924b8b7f593

Best regards,

Comments

Konrad Dybcio Sept. 5, 2024, 12:38 p.m. UTC | #1
On 4.09.2024 8:26 PM, Fabien Parent wrote:
> Commit 22e4e43484c4 ("arm64: dts: qcom: msm8939: Use mboxes
> properties for APCS") broke the boot on msm8939 platforms.
> 
> The issue comes from the SMD driver failing to request the mbox
> channel because of circular dependencies:
> 	1. rpm -> apcs1_mbox -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm.
> 	2. rpm -> apcs1_mbox -> gcc -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm
> 	3. rpm -> apcs1_mbox -> apcs2 -> gcc -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm
> 
> To fix this issue let's switch back to using the deprecated
> qcom,ipc property for the RPM node.
> 
> Fixes: 22e4e43484c4 ("arm64: dts: qcom: msm8939: Use mboxes properties for APCS")
> Signed-off-by: Fabien Parent <fabien.parent@linaro.org>
> ---

This is fine as a stopgap solution, Bjorn can we push it in -fixes?

This platform is admittedly not of top importance.. but fixing this
eventually would be nice

#regzbot introduced: 22e4e43484c4

Konrad
Konrad Dybcio Sept. 5, 2024, 12:39 p.m. UTC | #2
On 5.09.2024 2:38 PM, Konrad Dybcio wrote:
> On 4.09.2024 8:26 PM, Fabien Parent wrote:
>> Commit 22e4e43484c4 ("arm64: dts: qcom: msm8939: Use mboxes
>> properties for APCS") broke the boot on msm8939 platforms.
>>
>> The issue comes from the SMD driver failing to request the mbox
>> channel because of circular dependencies:
>> 	1. rpm -> apcs1_mbox -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm.
>> 	2. rpm -> apcs1_mbox -> gcc -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm
>> 	3. rpm -> apcs1_mbox -> apcs2 -> gcc -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm
>>
>> To fix this issue let's switch back to using the deprecated
>> qcom,ipc property for the RPM node.
>>
>> Fixes: 22e4e43484c4 ("arm64: dts: qcom: msm8939: Use mboxes properties for APCS")
>> Signed-off-by: Fabien Parent <fabien.parent@linaro.org>
>> ---
> 
> This is fine as a stopgap solution, Bjorn can we push it in -fixes?
> 
> This platform is admittedly not of top importance.. but fixing this
> eventually would be nice
> 
> #regzbot introduced: 22e4e43484c4

Reviewed-by: Konrad Dybcio <konradybcio@kernel.org>

Konrad
Luca Weiss Sept. 5, 2024, 2:26 p.m. UTC | #3
FWIW msm8226 has a similar problem but there it is enough to provide <&xo_board> instead of the equivalent &rpmcc reference to gcc, which is what was done in a recent patch for msm8226.dtsi.

But in the end clk and mailbox drivers should probably be split so that this dependency cycle can be broken. But I haven't looked into this further yet.

Regards
Luca

Konrad Dybcio <konradybcio@kernel.org> schreef op 5 september 2024 14:38:53 CEST:
>On 4.09.2024 8:26 PM, Fabien Parent wrote:
>> Commit 22e4e43484c4 ("arm64: dts: qcom: msm8939: Use mboxes
>> properties for APCS") broke the boot on msm8939 platforms.
>> 
>> The issue comes from the SMD driver failing to request the mbox
>> channel because of circular dependencies:
>> 	1. rpm -> apcs1_mbox -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm.
>> 	2. rpm -> apcs1_mbox -> gcc -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm
>> 	3. rpm -> apcs1_mbox -> apcs2 -> gcc -> rpmcc (RPM_SMD_XO_CLK_SRC) -> rpm
>> 
>> To fix this issue let's switch back to using the deprecated
>> qcom,ipc property for the RPM node.
>> 
>> Fixes: 22e4e43484c4 ("arm64: dts: qcom: msm8939: Use mboxes properties for APCS")
>> Signed-off-by: Fabien Parent <fabien.parent@linaro.org>
>> ---
>
>This is fine as a stopgap solution, Bjorn can we push it in -fixes?
>
>This platform is admittedly not of top importance.. but fixing this
>eventually would be nice
>
>#regzbot introduced: 22e4e43484c4
>
>Konrad
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi
index 46d9480cd464..39405713329b 100644
--- a/arch/arm64/boot/dts/qcom/msm8939.dtsi
+++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi
@@ -248,7 +248,7 @@  rpm: remoteproc {
 
 		smd-edge {
 			interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
-			mboxes = <&apcs1_mbox 0>;
+			qcom,ipc = <&apcs1_mbox 8 0>;
 			qcom,smd-edge = <15>;
 
 			rpm_requests: rpm-requests {