projects/linux·commit aa876cd4

dmaengine: at_xdmac: fix at_xdmac_prep_dma_memcpy()

aa876cd4 · Cyrille Pitchen <[email protected]> · 2015-12-07 15:58:56 +01:00

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 <[email protected]>
Acked-by: Ludovic Desroches <[email protected]>
Fixes: e1f7c9eee70 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Cc: [email protected] #4.1 and later
Signed-off-by: Vinod Koul <[email protected]>
Commit
aa876cd4b41b4e3bcfbc75dd5750d75d5fa97a67
Parents
bcb4b619

Changes

1 files changed · +1 −0

FileStatusAddDelContent
drivers/dma/at_xdmac.cmodified+1−0View file

drivers/dma/at_xdmac.c

View file
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index bda4951..370c661 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -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;