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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 18 Nov 2021 18:17:11 +0000 (19:17 +0100)
commit4ee1ac7f3cf56b2e9f629208bdf28d81397a48dd
tree05c0db4d7fa837859df0623f265db467532ecf21
parent0bff34d6712a6cedee6a4360268768836a1e4738
dmaengine: stm32-dma: fix burst in case of unaligned memory address

[ Upstream commit af229d2c2557b5cf2a3b1eb39847ec1de7446873 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/stm32-dma.c