Message ID | 20231204-msm8916-blsp-dma-remote-v1-2-3e49c8838c8d@gerhold.net |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp2667476vqy; Mon, 4 Dec 2023 02:25:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IHhkXtv0pKAvK2dzzRUpM+HMYz1jfdwp5Qrm3llwnDm8o/f+vaQwxLOcvjcDxr8ajArFLVR X-Received: by 2002:a17:90a:f689:b0:286:6cc1:77ff with SMTP id cl9-20020a17090af68900b002866cc177ffmr2890917pjb.66.1701685557478; Mon, 04 Dec 2023 02:25:57 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1701685557; cv=pass; d=google.com; s=arc-20160816; b=BP4y3lg8RNdO8wmKXMFYWd6UPvQ+c6MJOG1MqYbalrhk7CDapqjHcf5y5YwdwjphFk QasPc5k12G6yDP1AxIwfbVtzJz3mPZ4fGqHl7fkCQhIMr92WKbCy2mYsV98SBQWE9ug7 4Ep3WMUanPr/mvO451VmAXdEmNqRKjarmLhr97xTB7aySUkqjwaZ5B8kDMtAl8YU2mTu PN98AyzrJVDQwP/CUsFxBYHbZxmkJCUoK9csZI0A136lpOpyJSohLNluxokYVU0pHCJ2 j+b5/kYp6yWIFFr6qiVguVb0hlvC1uuYOMyEyq4JNCr+lDVZmYlw/CGrTWBIj/GknQSg hucg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=xEB0wIQxDD7Q+oCC+SxhubyPvyNdktr5eK2L/lsv3xc=; fh=WU4onb5zTy7IBgVB9TEyVX5gCt4JbOwFC/RThck7mG4=; b=h4OvZp0tUp1WhRLRbNyf5P3XozgL5JKUQlBrKKsOqGPQdOyGQMNkxw7hKyjXD5JZ6v ke7/XNe7H8LCBK4DjAJnXYCYbyiD8N6t8CKfkjvGyU+B4F1Qnr7tmcp0VO2a2HQE4JRS CSuhcQ+gMftagGRhKKBCHTtP9HrAl7x2w+8TxRfH5v8xi0Ts8KMxqTQqhqoMzWfYIRDI Nm/bFpn4RsPReZ4jhwTNyEuH0w40UeDZiHJ1PMRYUzsBPAFJdhS6skdagAsmokwYQC7R 0/TN5Ej5b3EafPKammLye93hVE9UHbzGr7GjISzhYEV8zqiS6DG76PA4XwF2eDDNF+Xn tVFA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=csUxHlaz; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id 99-20020a17090a09ec00b00285864ca8a0si9773328pjo.180.2023.12.04.02.25.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 02:25:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=csUxHlaz; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 566A38075DEB; Mon, 4 Dec 2023 02:25:27 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235443AbjLDKZR (ORCPT <rfc822;chrisfriedt@gmail.com> + 99 others); Mon, 4 Dec 2023 05:25:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45796 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343958AbjLDKYu (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 4 Dec 2023 05:24:50 -0500 X-Greylist: delayed 185 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 04 Dec 2023 02:24:39 PST Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E0FAA129; Mon, 4 Dec 2023 02:24:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701685292; cv=none; d=strato.com; s=strato-dkim-0002; b=mt2Sv/Pql0jiqXPCAUjVkHPemFANe2vQ70e5FrbhPNrqX5H36oIMDgkgoSWFVQdyYQ Cbmxog3KWk7Z0ZEc7CYH4DIFTquu6Ch9Ot/dr5Kl6B8AS0yvZPzt2sbb2QZ+uiywzg4V pbEphNCQKUA1ofzZxfR6bUmh04J/ZJkhRzvO5NJRyUnuPCXeC2q/63NCU3lWjuRhhlMB S6EE3c62oVNxSdOoY3B+D8z8u2iPLSJt7hfCjhJRmbb/vDOfLQyAnwkya4LPehQ3CkFt hPS4eXBLo3eBgp84oxf+S784FWhslxR7yWtikjAT411dILCPxfzyFOmPHKXC1s9xkTVo Cg+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1701685292; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=xEB0wIQxDD7Q+oCC+SxhubyPvyNdktr5eK2L/lsv3xc=; b=Vg1G3ULwHtvFsUQsStCW6mRp6U812dBh23GMWJgq9K+Gl1k59nowlkF1g4hWLb4Vit AeQ6Ajx57Wjz15s2qL9ruIIHTqVS2FUpAURPC3aqFeAVOJpZLtx2tMbXB9CSniNHeBAc Mfpg8xUC+eYYP0v18ZwP2LnG4DxzEZNh/2/11hFe9CNQG2jmqmkaRKyGFtY8bVIeiRtx 0tZD2PcOtshcUaw1cmyi6yEIASQ+1lTinpSesW+YZDlDE4EpHXRLgeRLnP8jIDrHO9ZH Lfi+fGgT18VNqiNx+IMVz5qAydyKKpkt0kRCdDwcjWqSjjmyaHCjBOhHPBnLfWdcHWcg fOuA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1701685292; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=xEB0wIQxDD7Q+oCC+SxhubyPvyNdktr5eK2L/lsv3xc=; b=csUxHlazh+KuKR/3CC+hIPDU5F7X1c3zmMlT+ULMD8WY/LEtEb9DTAJrpxJJMbhe3u 7+NCVNE9LJEaQ/tyji2JbE5Jc0wbr44VE5tUT+K5ekZgQ9ZreV5bLO+BlbB7FQ1FBgkT FZAscyS2VClPFvN8PVBU5z9Nqu7uW/w8r5oKfR/LeTw3V3/HzXqbGPVSSJnh4acMWkxL gOU83nov9ynH433mF3bUF+H+vekuSQIzlr2UrxgFrQz7E/kOOFaoiZN0hXCabH06o+85 krjLcMFgUn/JcplNFBbscvtNnCC8BMi26XzV1frwp6LghRlSecd3yeKBEvukDxtaDLib QZHg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1701685292; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=xEB0wIQxDD7Q+oCC+SxhubyPvyNdktr5eK2L/lsv3xc=; b=V0mH2p0hBCHZhrkE6nDSgeWPd3zsS2k5LWzFtJ3wN0l1EUbgKaVzXvC8F/VGadLQBr CfrXMmKL/w6f1ek6JnBQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.9.7 DYNA|AUTH) with ESMTPSA id R5487bzB4ALVA1y (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Mon, 4 Dec 2023 11:21:31 +0100 (CET) From: Stephan Gerhold <stephan@gerhold.net> Date: Mon, 04 Dec 2023 11:21:21 +0100 Subject: [PATCH 2/2] arm64: dts: qcom: msm8939: Make blsp_dma controlled-remotely MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231204-msm8916-blsp-dma-remote-v1-2-3e49c8838c8d@gerhold.net> References: <20231204-msm8916-blsp-dma-remote-v1-0-3e49c8838c8d@gerhold.net> In-Reply-To: <20231204-msm8916-blsp-dma-remote-v1-0-3e49c8838c8d@gerhold.net> To: Bjorn Andersson <andersson@kernel.org> Cc: Andy Gross <agross@kernel.org>, Konrad Dybcio <konrad.dybcio@linaro.org>, Bryan O'Donoghue <bryan.odonoghue@linaro.org>, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Stephan Gerhold <stephan@gerhold.net>, stable@vger.kernel.org X-Mailer: b4 0.12.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Mon, 04 Dec 2023 02:25:27 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1784346634921830229 X-GMAIL-MSGID: 1784346634921830229 |
Series |
arm64: dts: qcom: msm8916/39: Make blsp_dma controlled-remotely
|
|
Commit Message
Stephan Gerhold
Dec. 4, 2023, 10:21 a.m. UTC
The blsp_dma controller is shared between the different subsystems,
which is why it is already initialized by the firmware. We should not
reinitialize it from Linux to avoid potential other users of the DMA
engine to misbehave.
In mainline this can be described using the "qcom,controlled-remotely"
property. In the downstream/vendor kernel from Qualcomm there is an
opposite "qcom,managed-locally" property. This property is *not* set
for the qcom,sps-dma@7884000 [1] so adding "qcom,controlled-remotely"
upstream matches the behavior of the downstream/vendor kernel.
Adding this seems to fix some weird issues with UART where both
input/output becomes garbled with certain obscure firmware versions on
some devices.
[1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blob/LA.BR.1.2.9.1-02310-8x16.0/arch/arm/boot/dts/qcom/msm8939-common.dtsi#L866-872
Cc: <stable@vger.kernel.org> # 6.5
Fixes: 61550c6c156c ("arm64: dts: qcom: Add msm8939 SoC")
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---
This should only be backported to v6.5+ since it depends on commit
8975dd41a9db ("dmaengine: qcom: bam_dma: allow omitting
num-{channels,ees}") which landed in v6.5.
---
arch/arm64/boot/dts/qcom/msm8939.dtsi | 1 +
1 file changed, 1 insertion(+)
Comments
On 04/12/2023 11:21, Stephan Gerhold wrote: > The blsp_dma controller is shared between the different subsystems, > which is why it is already initialized by the firmware. We should not > reinitialize it from Linux to avoid potential other users of the DMA > engine to misbehave. > > In mainline this can be described using the "qcom,controlled-remotely" > property. In the downstream/vendor kernel from Qualcomm there is an > opposite "qcom,managed-locally" property. This property is *not* set > for the qcom,sps-dma@7884000 [1] so adding "qcom,controlled-remotely" > upstream matches the behavior of the downstream/vendor kernel. > > Adding this seems to fix some weird issues with UART where both > input/output becomes garbled with certain obscure firmware versions on > some devices. > > [1]: https://git.codelinaro.org/clo/la/kernel/msm-3.10/-/blob/LA.BR.1.2.9.1-02310-8x16.0/arch/arm/boot/dts/qcom/msm8939-common.dtsi#L866-872 > > Cc: <stable@vger.kernel.org> # 6.5 > Fixes: 61550c6c156c ("arm64: dts: qcom: Add msm8939 SoC") > Signed-off-by: Stephan Gerhold <stephan@gerhold.net> > --- > This should only be backported to v6.5+ since it depends on commit > 8975dd41a9db ("dmaengine: qcom: bam_dma: allow omitting > num-{channels,ees}") which landed in v6.5. > --- > arch/arm64/boot/dts/qcom/msm8939.dtsi | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi > index 95610a32750a..9eb8f1ceee99 100644 > --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi > +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi > @@ -1761,6 +1761,7 @@ blsp_dma: dma-controller@7884000 { > clock-names = "bam_clk"; > #dma-cells = <1>; > qcom,ee = <0>; > + qcom,controlled-remotely; > }; > > blsp_uart1: serial@78af000 { > Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index 95610a32750a..9eb8f1ceee99 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -1761,6 +1761,7 @@ blsp_dma: dma-controller@7884000 { clock-names = "bam_clk"; #dma-cells = <1>; qcom,ee = <0>; + qcom,controlled-remotely; }; blsp_uart1: serial@78af000 {