OSDN Git Service

dmaengine: zynqmp_dma: fix burst length configuration
authorMatthias Fend <matthias.fend@wolfvision.net>
Wed, 15 Jan 2020 10:22:49 +0000 (11:22 +0100)
committerVinod Koul <vkoul@kernel.org>
Tue, 21 Jan 2020 09:19:30 +0000 (14:49 +0530)
commitcc88525ebffc757e00cc5a5d61da6271646c7f5f
treea0a1cd3df6b3fc5280d45cf104a965d0a6fbe7f7
parentffc079a4accc2bd02758eb93cb8efcb3bfee1891
dmaengine: zynqmp_dma: fix burst length configuration

Since the dma engine expects the burst length register content as
power of 2 value, the burst length needs to be converted first.
Additionally add a burst length range check to avoid corrupting unrelated
register bits.

Signed-off-by: Matthias Fend <matthias.fend@wolfvision.net>
Link: https://lore.kernel.org/r/20200115102249.24398-1-matthias.fend@wolfvision.net
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/xilinx/zynqmp_dma.c