dmaengine: stm32-dma: fix burst in case of unaligned memory address
authorAmelie Delaunay <amelie.delaunay@foss.st.com>
Mon, 11 Oct 2021 09:42:59 +0000 (11:42 +0200)
committerVinod Koul <vkoul@kernel.org>
Mon, 18 Oct 2021 06:42:50 +0000 (12:12 +0530)
commitaf229d2c2557b5cf2a3b1eb39847ec1de7446873
tree6afb7bdf9d7ad26ec5508ea9b790b67245306a48
parentb20fd5fa310cbf7ec367f263a34382a24c4cee73
dmaengine: stm32-dma: fix burst in case of unaligned memory address

Theorically, address pointers used by STM32 DMA must be chosen so as to
ensure that all transfers within a burst block are aligned on the address
boundary equal to the size of the transfer.
If this is always the case for peripheral addresses on STM32, it is not for
memory addresses if the user doesn't respect this alignment constraint.
To avoid a weird behavior of the DMA controller in this case (no error
triggered but data are not transferred as expected), force no burst.

Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20211011094259.315023-4-amelie.delaunay@foss.st.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/stm32-dma.c