Hi Matthias, > -----Original Message----- > From: Michal Simek [mailto:michal.simek@xxxxxxxxxx] > Sent: Friday, January 10, 2020 2:18 PM > To: Matthias Fend <matthias.fend@xxxxxxxxxxxxxx>; linux-arm- > kernel@xxxxxxxxxxxxxxxxxxx > Cc: dmaengine@xxxxxxxxxxxxxxx; Michal Simek <michals@xxxxxxxxxx>; > vkoul@xxxxxxxxxx; Radhey Shyam Pandey <radheys@xxxxxxxxxx>; Harini > Katakam <harinik@xxxxxxxxxx> > Subject: Re: [PATCH] dmaengine: zynqmp_dma: fix burst length configuration > > +Radhey and Harini > > On 10. 01. 20 9:26, Matthias Fend wrote: > > 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@xxxxxxxxxxxxxx> > > --- > > drivers/dma/xilinx/zynqmp_dma.c | 24 +++++++++++++++--------- > > 1 file changed, 15 insertions(+), 9 deletions(-) > > > > diff --git a/drivers/dma/xilinx/zynqmp_dma.c > > b/drivers/dma/xilinx/zynqmp_dma.c index 9c845c07b107..aa4de6c6688a > > 100644 > > --- a/drivers/dma/xilinx/zynqmp_dma.c > > +++ b/drivers/dma/xilinx/zynqmp_dma.c > > @@ -123,10 +123,12 @@ > > /* Max transfer size per descriptor */ > > #define ZYNQMP_DMA_MAX_TRANS_LEN 0x40000000 > > > > +/* Max burst lengths */ > > +#define ZYNQMP_DMA_MAX_DST_BURST_LEN 16 > > +#define ZYNQMP_DMA_MAX_SRC_BURST_LEN 16 > > + > > /* Reset values for data attributes */ > > #define ZYNQMP_DMA_AXCACHE_VAL 0xF > > -#define ZYNQMP_DMA_ARLEN_RST_VAL 0xF > > -#define ZYNQMP_DMA_AWLEN_RST_VAL 0xF <snip> > > @@ -887,8 +893,8 @@ static int zynqmp_dma_chan_probe(struct > zynqmp_dma_device *zdev, > > return PTR_ERR(chan->regs); > > > > chan->bus_width = ZYNQMP_DMA_BUS_WIDTH_64; > > - chan->dst_burst_len = ZYNQMP_DMA_AWLEN_RST_VAL; > > - chan->src_burst_len = ZYNQMP_DMA_ARLEN_RST_VAL; > > + chan->dst_burst_len = ZYNQMP_DMA_MAX_DST_BURST_LEN; > > + chan->src_burst_len = ZYNQMP_DMA_MAX_SRC_BURST_LEN; > > err = of_property_read_u32(node, "xlnx,bus-width", &chan- > >bus_width); Just a note that this changes the reset value of this field from 0xF (acc to the spec) to 0x4. It may need to be updated for future IP versions, if any, but I think it makes sense for now. Thanks. Reviewed-by: Harini Katakam <harini.katakam@xxxxxxxxxx> Regards, Harini