linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Appana Durga Kedareswara Rao <appana.durga.rao@xilinx.com>
To: Vinod Koul <vinod.koul@intel.com>
Cc: "dan.j.williams@intel.com" <dan.j.williams@intel.com>,
	Michal Simek <michals@xilinx.com>,
	Soren Brinkmann <sorenb@xilinx.com>,
	"moritz.fischer@ettus.com" <moritz.fischer@ettus.com>,
	"laurent.pinchart@ideasonboard.com" 
	<laurent.pinchart@ideasonboard.com>,
	"luis@debethencourt.com" <luis@debethencourt.com>,
	Punnaiah Choudary Kalluri <punnaia@xilinx.com>,
	"dmaengine@vger.kernel.org" <dmaengine@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH v2 3/4] dmaengine: vdma: Add 64 bit addressing support for the axi dma
Date: Tue, 7 Jun 2016 06:13:49 +0000	[thread overview]
Message-ID: <C246CAC1457055469EF09E3A7AC4E11A4A5B4A40@XAP-PVEXMBX01.xlnx.xilinx.com> (raw)
In-Reply-To: <20160607061701.GG16910@localhost>

Hi Vinod,

> On Wed, May 18, 2016 at 01:17:32PM +0530, Kedareswara rao Appana wrote:
> > +		if (chan->cyclic) {
> > +			if (chan->ext_addr)
> > +				dma_writeq(chan,
> XILINX_DMA_REG_TAILDESC,
> > +					   chan->cyclic_seg_v->phys);
> > +			else
> > +				dma_ctrl_write(chan,
> XILINX_DMA_REG_TAILDESC,
> > +					       chan->cyclic_seg_v->phys);
> > +		} else {
> > +			if (chan->ext_addr)
> > +				dma_writeq(chan,
> XILINX_DMA_REG_TAILDESC,
> > +					   tail_segment->phys);
> > +			else
> > +				dma_ctrl_write(chan,
> XILINX_DMA_REG_TAILDESC,
> > +					       tail_segment->phys);
> 
> this looks ugly and repeated few times. Why not have xilinx_write() which does
> either dma_writeq or dma_ctrl_write based on channel..

Ok sure will fix in the next version...

> 
> > +			if (chan->ext_addr) {
> > +				hw->buf_addr = lower_32_bits(buf_addr +
> > +						sg_used + (period_len * i));
> > +				hw->buf_addr_msb = upper_32_bits(buf_addr +
> > +						sg_used + (period_len * i));
> > +			} else {
> > +				hw->buf_addr = buf_addr + sg_used +
> > +					       (period_len * i);
> > +			}
> 
> similar wrapper here would make code more readable

Ok Sure will fix in the next version...

Thanks,
Kedar.

  reply	other threads:[~2016-06-07  6:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-18  7:47 [PATCH v2 0/4] dmaengine: vdma: AXI DMA's enhancments Kedareswara rao Appana
2016-05-18  7:47 ` [PATCH v2 1/4] dmaengine: vdma: Add support for cyclic dma mode Kedareswara rao Appana
2016-06-07  6:18   ` Vinod Koul
2016-05-18  7:47 ` [PATCH v2 2/4] dmaengine: vdma: Use dma_pool_zalloc Kedareswara rao Appana
2016-06-07  6:19   ` Vinod Koul
2016-05-18  7:47 ` [PATCH v2 3/4] dmaengine: vdma: Add 64 bit addressing support for the axi dma Kedareswara rao Appana
2016-06-07  6:17   ` Vinod Koul
2016-06-07  6:13     ` Appana Durga Kedareswara Rao [this message]
2016-05-18  7:47 ` [PATCH v2 4/4] dmaengine: vdma: Add 64 bit addressing support for the axi cdma Kedareswara rao Appana

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=C246CAC1457055469EF09E3A7AC4E11A4A5B4A40@XAP-PVEXMBX01.xlnx.xilinx.com \
    --to=appana.durga.rao@xilinx.com \
    --cc=dan.j.williams@intel.com \
    --cc=dmaengine@vger.kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luis@debethencourt.com \
    --cc=michals@xilinx.com \
    --cc=moritz.fischer@ettus.com \
    --cc=punnaia@xilinx.com \
    --cc=sorenb@xilinx.com \
    --cc=vinod.koul@intel.com \
    /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).