2022-12-16 18:38:11

by Vijaya Krishna Nivarthi

[permalink] [raw]
Subject: [V2] dmaengine: qcom: gpi: Set link_rx bit on GO TRE for rx operation

Rx operation on SPI GSI DMA is currently not working.
As per GSI spec, link_rx bit is to be set on GO TRE on tx
channel whenever there is going to be a DMA TRE on rx
channel. This is currently set for duplex operation only.

Set the bit for rx operation as well.
This is part of changes required to bring up Rx.

Fixes: 94b8f0e58fa1 ("dmaengine: qcom: gpi: set chain and link flag for duplex")
Signed-off-by: Vijaya Krishna Nivarthi <[email protected]>
---
v1 -> v2:
- updated change description
---
drivers/dma/qcom/gpi.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/dma/qcom/gpi.c b/drivers/dma/qcom/gpi.c
index 061add8..59a36cb 100644
--- a/drivers/dma/qcom/gpi.c
+++ b/drivers/dma/qcom/gpi.c
@@ -1756,6 +1756,7 @@ static int gpi_create_spi_tre(struct gchan *chan, struct gpi_desc *desc,
tre->dword[3] = u32_encode_bits(TRE_TYPE_GO, TRE_FLAGS_TYPE);
if (spi->cmd == SPI_RX) {
tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_IEOB);
+ tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_LINK);
} else if (spi->cmd == SPI_TX) {
tre->dword[3] |= u32_encode_bits(1, TRE_FLAGS_CHAIN);
} else { /* SPI_DUPLEX */
--
Qualcomm INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by the Linux Foundation.


2022-12-16 20:58:28

by Doug Anderson

[permalink] [raw]
Subject: Re: [V2] dmaengine: qcom: gpi: Set link_rx bit on GO TRE for rx operation

Hi,

On Fri, Dec 16, 2022 at 9:38 AM Vijaya Krishna Nivarthi
<[email protected]> wrote:
>
> Rx operation on SPI GSI DMA is currently not working.
> As per GSI spec, link_rx bit is to be set on GO TRE on tx
> channel whenever there is going to be a DMA TRE on rx
> channel. This is currently set for duplex operation only.
>
> Set the bit for rx operation as well.
> This is part of changes required to bring up Rx.
>
> Fixes: 94b8f0e58fa1 ("dmaengine: qcom: gpi: set chain and link flag for duplex")
> Signed-off-by: Vijaya Krishna Nivarthi <[email protected]>
> ---
> v1 -> v2:
> - updated change description
> ---
> drivers/dma/qcom/gpi.c | 1 +
> 1 file changed, 1 insertion(+)

Without knowing anything about how the hardware actually works, I can
say that the change looks OK to me.

Reviewed-by: Douglas Anderson <[email protected]>

2022-12-28 07:13:25

by Vinod Koul

[permalink] [raw]
Subject: Re: [V2] dmaengine: qcom: gpi: Set link_rx bit on GO TRE for rx operation

On 16-12-22, 23:08, Vijaya Krishna Nivarthi wrote:
> Rx operation on SPI GSI DMA is currently not working.
> As per GSI spec, link_rx bit is to be set on GO TRE on tx
> channel whenever there is going to be a DMA TRE on rx
> channel. This is currently set for duplex operation only.
>
> Set the bit for rx operation as well.
> This is part of changes required to bring up Rx.

Applied, thanks

--
~Vinod