From: Harini Katakam <harinik@xilinx.com>
To: Michal Simek <michals@xilinx.com>,
Matthias Fend <matthias.fend@wolfvision.net>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Cc: "dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
"vkoul@kernel.org" <vkoul@kernel.org>,
Michal Simek <michals@xilinx.com>,
Radhey Shyam Pandey <radheys@xilinx.com>
Subject: RE: [PATCH] dmaengine: zynqmp_dma: fix burst length configuration
Date: Wed, 15 Jan 2020 05:41:58 +0000 [thread overview]
Message-ID: <BN7PR02MB5121D2FEF76CF4A69BDEA7FFC9370@BN7PR02MB5121.namprd02.prod.outlook.com> (raw)
In-Reply-To: <137545d8-466d-e2f6-1e3e-8879dcee423d@xilinx.com>
Hi Matthias,
> -----Original Message-----
> From: Michal Simek [mailto:michal.simek@xilinx.com]
> Sent: Friday, January 10, 2020 2:18 PM
> To: Matthias Fend <matthias.fend@wolfvision.net>; linux-arm-
> kernel@lists.infradead.org
> Cc: dmaengine@vger.kernel.org; Michal Simek <michals@xilinx.com>;
> vkoul@kernel.org; Radhey Shyam Pandey <radheys@xilinx.com>; Harini
> Katakam <harinik@xilinx.com>
> 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@wolfvision.net>
> > ---
> > 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@xilinx.com>
Regards,
Harini
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-01-15 5:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 8:26 [PATCH] dmaengine: zynqmp_dma: fix burst length configuration Matthias Fend
2020-01-10 8:48 ` Michal Simek
2020-01-15 5:41 ` Harini Katakam [this message]
2020-01-21 9:18 ` Vinod Koul
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=BN7PR02MB5121D2FEF76CF4A69BDEA7FFC9370@BN7PR02MB5121.namprd02.prod.outlook.com \
--to=harinik@xilinx.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=matthias.fend@wolfvision.net \
--cc=michals@xilinx.com \
--cc=radheys@xilinx.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).