Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1415729 > unrolled thread
| Started by | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| First post | 2016-06-07 08:20 +0200 |
| Last post | 2016-06-07 08:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 3/4] dmaengine: vdma: Add 64 bit addressing support for the axi dma Vinod Koul <vinod.koul@intel.com> - 2016-06-07 08:20 +0200
| From | Vinod Koul <vinod.koul@intel.com> |
|---|---|
| Date | 2016-06-07 08:20 +0200 |
| Subject | Re: [PATCH v2 3/4] dmaengine: vdma: Add 64 bit addressing support for the axi dma |
| Message-ID | <rHiwO-7rh-7@gated-at.bofh.it> |
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..
> + 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
--
~Vinod
Back to top | Article view | linux.kernel
csiph-web