]> git.dujemihanovic.xyz Git - linux.git/commitdiff
arm64: dts: qcom: sc7180: Mark SCM as dma-coherent for IDP
authorDouglas Anderson <dianders@chromium.org>
Fri, 16 Jun 2023 15:14:39 +0000 (08:14 -0700)
committerBjorn Andersson <andersson@kernel.org>
Thu, 22 Jun 2023 19:20:12 +0000 (12:20 -0700)
sc7180-idp is, for most intents and purposes, a trogdor device.
Specifically, sc7180-idp is designed to run the same style of firmware
as trogdor devices. This can be seen from the fact that IDP has the
same "Reserved memory changes" in its device tree that trogdor has.

Recently it was realized that we need to mark SCM as dma-coherent to
match what trogdor's style of firmware (based on TF-A) does [1]. That
means we need this dma-coherent tag on IDP as well.

Without this, on newer versions of Linux, specifically those with
commit 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache
invalidation from arch_dma_prep_coherent()"""), WiFi will fail to
work. At bootup you'll see:

  qcom_scm firmware:scm: Assign memory protection call failed -22
  qcom_rmtfs_mem 94600000.memory: assign memory failed
  qcom_rmtfs_mem: probe of 94600000.memory failed with error -22

[1] https://lore.kernel.org/r/20230615145253.1.Ic62daa649b47b656b313551d646c4de9a7da4bd4@changeid

Fixes: 7bd6680b47fa ("Revert "Revert "arm64: dma: Drop cache invalidation from arch_dma_prep_coherent()""")
Fixes: f5ab220d162c ("arm64: dts: qcom: sc7180: Add remoteproc enablers")
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20230616081440.v2.2.I3c17d546d553378aa8a0c68c3fe04bccea7cba17@changeid
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/sc7180-idp.dts
arch/arm64/boot/dts/qcom/sc7180.dtsi

index 9f052270e0908c8e48b8c724edded66fb663f323..299ef5dc225ab327b1cd9ef58a870309821c7763 100644 (file)
        qcom,spare-regs = <&tcsr_regs_2 0xb3e4>;
 };
 
+&scm {
+       /* TF-A firmware maps memory cached so mark dma-coherent to match. */
+       dma-coherent;
+};
+
 &sdhc_1 {
        status = "okay";
 
index f479cab8ab45c44a3f3a45617908884df4a4ea6f..a65be760d1a7c0b29255c6e3e76cb4fc8d0f3bfd 100644 (file)
        };
 
        firmware {
-               scm {
+               scm: scm {
                        compatible = "qcom,scm-sc7180", "qcom,scm";
                };
        };