2021-06-24 09:41:22

by Amelie Delaunay

[permalink] [raw]
Subject: [PATCH 0/2] STM32 DMA alternative REQ/ACK protocol support

Default REQ/ACK protocol consists in maintaining ACK signal up to the
removal of REQuest and the transfer completion.
In case of alternative REQ/ACK protocol, ACK de-assertion does not wait the
removal of the REQuest, but only the transfer completion.
Due to a possible DMA stream lock when transferring data to/from STM32
USART/UART, add support to select alternative REQ/ACK protocol.

Amelie Delaunay (2):
dt-bindings: dma: add alternative REQ/ACK protocol selection in
stm32-dma
dmaengine: stm32-dma: add alternate REQ/ACK protocol management

Documentation/devicetree/bindings/dma/st,stm32-dma.yaml | 7 +++++++
drivers/dma/stm32-dma.c | 8 ++++++--
2 files changed, 13 insertions(+), 2 deletions(-)

--
2.25.1


2021-06-24 09:41:56

by Amelie Delaunay

[permalink] [raw]
Subject: [PATCH 1/2] dt-bindings: dma: add alternative REQ/ACK protocol selection in stm32-dma

Default REQ/ACK protocol consists in maintaining ACK signal up to the
removal of REQuest and the transfer completion.
In case of alternative REQ/ACK protocol, ACK de-assertion does not wait the
removal of the REQuest, but only the transfer completion.
Due to a possible DMA stream lock when transferring data to/from STM32
USART/UART, this new bindings allow to select this alternative protocol in
device tree, especially for STM32 USART/UART nodes.

Signed-off-by: Amelie Delaunay <[email protected]>
---
Documentation/devicetree/bindings/dma/st,stm32-dma.yaml | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/dma/st,stm32-dma.yaml b/Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
index 2a5325f480f6..4bf676fd25dc 100644
--- a/Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/st,stm32-dma.yaml
@@ -40,6 +40,13 @@ description: |
0x0: FIFO mode with threshold selectable with bit 0-1
0x1: Direct mode: each DMA request immediately initiates a transfer
from/to the memory, FIFO is bypassed.
+ -bit 4: alternative DMA request/acknowledge protocol
+ 0x0: Use standard DMA ACK management, where ACK signal is maintained
+ up to the removal of request and transfer completion
+ 0x1: Use alternative DMA ACK management, where ACK de-assertion does
+ not wait for the de-assertion of the REQuest, ACK is only managed
+ by transfer completion. This must only be used on channels
+ managing transfers for STM32 USART/UART.


maintainers:
--
2.25.1

2021-07-14 19:30:24

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 1/2] dt-bindings: dma: add alternative REQ/ACK protocol selection in stm32-dma

On Thu, 24 Jun 2021 11:39:58 +0200, Amelie Delaunay wrote:
> Default REQ/ACK protocol consists in maintaining ACK signal up to the
> removal of REQuest and the transfer completion.
> In case of alternative REQ/ACK protocol, ACK de-assertion does not wait the
> removal of the REQuest, but only the transfer completion.
> Due to a possible DMA stream lock when transferring data to/from STM32
> USART/UART, this new bindings allow to select this alternative protocol in
> device tree, especially for STM32 USART/UART nodes.
>
> Signed-off-by: Amelie Delaunay <[email protected]>
> ---
> Documentation/devicetree/bindings/dma/st,stm32-dma.yaml | 7 +++++++
> 1 file changed, 7 insertions(+)
>

Acked-by: Rob Herring <[email protected]>

2021-07-28 07:11:04

by Vinod Koul

[permalink] [raw]
Subject: Re: [PATCH 0/2] STM32 DMA alternative REQ/ACK protocol support

On 24-06-21, 11:39, Amelie Delaunay wrote:
> Default REQ/ACK protocol consists in maintaining ACK signal up to the
> removal of REQuest and the transfer completion.
> In case of alternative REQ/ACK protocol, ACK de-assertion does not wait the
> removal of the REQuest, but only the transfer completion.
> Due to a possible DMA stream lock when transferring data to/from STM32
> USART/UART, add support to select alternative REQ/ACK protocol.

Applied, thanks

--
~Vinod