Skip to content

Commit

Permalink
dmaengine: at_xdmac: fix at_xdmac_prep_dma_memcpy()
Browse files Browse the repository at this point in the history
This patch fixes at_xdmac_prep_dma_memcpy(). Indeed the data width field
of the Channel Configuration register was not updated properly in the
loop: the bits of the dwidth field were not cleared before adding their
new value.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Fixes: e1f7c9e ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Cc: stable@vger.kernel.org grate-driver#4.1 and later
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Cyrille Pitchen authored and Vinod Koul committed Dec 10, 2015
1 parent bcb4b61 commit aa876cd
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/dma/at_xdmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,7 @@ at_xdmac_prep_dma_memcpy(struct dma_chan *chan, dma_addr_t dest, dma_addr_t src,
/* Check remaining length and change data width if needed. */
dwidth = at_xdmac_align_width(chan,
src_addr | dst_addr | xfer_size);
chan_cc &= ~AT_XDMAC_CC_DWIDTH_MASK;
chan_cc |= AT_XDMAC_CC_DWIDTH(dwidth);

ublen = xfer_size >> dwidth;
Expand Down

0 comments on commit aa876cd

Please sign in to comment.