From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Vinod Koul <vkoul@kernel.org>
Cc: linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] dmaengine: qcom: gpi: set chain and link flag for duplex
Date: Tue, 12 Apr 2022 14:30:44 -0700 [thread overview]
Message-ID: <YlXvhAJHl2JKy2+6@ripper> (raw)
In-Reply-To: <20220406132508.1029348-1-vkoul@kernel.org>
On Wed 06 Apr 06:25 PDT 2022, Vinod Koul wrote:
> Newer platforms seem to have strict requirement for TRE flags which
> causes transaction to timeout. This was resolved to missing chain and
> link flag for duplex spi transaction.
>
> So add these two flags.
>
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> drivers/dma/qcom/gpi.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
> index 94f3648f7483..3429ceccd13b 100644
> --- a/drivers/dma/qcom/gpi.c
> +++ b/drivers/dma/qcom/gpi.c
> @@ -1754,10 +1754,14 @@ static int gpi_create_spi_tre(struct gchan *chan, struct gpi_desc *desc,
> tre->dword[2] = u32_encode_bits(spi->rx_len, TRE_RX_LEN);
>
> tre->dword[3] = u32_encode_bits(TRE_TYPE_GO, TRE_FLAGS_TYPE);
> - if (spi->cmd == SPI_RX)
> + if (spi->cmd == SPI_RX) {
> tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_IEOB);
> - else
> + } else if (spi->cmd == SPI_TX) {
> + tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_CHAIN);
> + } else { /* SPI_DUPLEX */
> tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_CHAIN);
> + tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_LINK);
> + }
> }
>
> /* create the dma tre */
> --
> 2.34.1
>
next prev parent reply other threads:[~2022-04-12 23:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-06 13:25 [PATCH 1/3] dmaengine: qcom: gpi: set chain and link flag for duplex Vinod Koul
2022-04-06 13:25 ` [PATCH 2/3] dt-bindings: dmaengine: qcom: gpi: add compatible for sm8350/sm8350 Vinod Koul
2022-04-07 7:32 ` Krzysztof Kozlowski
2022-04-12 21:30 ` Bjorn Andersson
2022-04-06 13:25 ` [PATCH 3/3] dmaengine: qcom: gpi: Add support for ee_offset Vinod Koul
2022-04-12 21:31 ` Bjorn Andersson
2022-04-12 21:30 ` Bjorn Andersson [this message]
2022-04-13 12:24 ` [PATCH 1/3] dmaengine: qcom: gpi: set chain and link flag for duplex Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YlXvhAJHl2JKy2+6@ripper \
--to=bjorn.andersson@linaro.org \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).