lkml.org 
[lkml]   [2015]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH char-misc-next 11/19] dma: Add support to program MIC x100 status descriptiors
On Mon, Jul 27, 2015 at 04:58:17PM -0700, Ashutosh Dixit wrote:
> +/* Program a status descriptor with phys as address and value to be written */
> +static int mic_dma_do_status_update(struct mic_dma_chan *ch, dma_addr_t phys,
> + u64 value)
> +{
> + int ret = mic_dma_avail_desc_ring_space(ch, 4);
> +
> + if (ret < 0)
> + return ret;
> + ret = 0;
?
> + mic_dma_prep_status_desc(&ch->desc_ring[ch->head],
> + value, phys, false);
> + mic_dma_hw_ring_inc_head(ch);
> + return ret;

return 0 then?

> +}
> +
> static inline void mic_dma_issue_pending(struct dma_chan *ch)
> {
> struct mic_dma_chan *mic_ch = to_mic_dma_chan(ch);
> @@ -287,9 +310,28 @@ mic_dma_prep_memcpy_lock(struct dma_chan *ch, dma_addr_t dma_dest,
> return NULL;
>
> spin_lock(&mic_ch->prep_lock);
> + if (len == 8) {
magic number?

> + /*
> + * This is a hack to program status descriptor since
> + * DMA engine API doesn't have support for this.
> + */
what do you mean by programming status descriptor, what do you need to
program?

--
~Vinod



\
 
 \ /
  Last update: 2015-08-20 07:41    [W:0.207 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site