Skip to content
Commit 4e0e3c99 authored by Mike J. Chen's avatar Mike J. Chen Committed by Fabio Baltieri
Browse files

drivers: dma: dma_mcux_lpc: fix src_inc/dst_inc for block chain



The dma driver was determining src_inc and dst_inc from the
config of the first block buffer and ignoring the config
flags for any additional buffers in the chain, which could
lead to incorrect transfers (e.g. in a multiple rx buffer
case, if the first buffer was to receive to NULL,
but the subsequent buffers were not NULL, the bug
would manifest as all transfers being made with
dst_inc of 0). Change the driver to setup
each dma descriptor according to the addr_adj flag
of each block_buffer.

Add check that peripheral transfers have addr_adj set to
NO_CHANGE instead of assuming it, to help catch errors.

Also now check for invalid addr_adj request of
decrement, which this controller doesn't support.

Signed-off-by: default avatarMike J. Chen <mjchen@google.com>
parent 1c4351a2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment