lkml.org 
[lkml]   [2011]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v3] dmaengine: add CSR SiRFprimaII DMAC driver
2011/10/17 Vinod Koul <vinod.koul@intel.com>:
>> +static struct dma_async_tx_descriptor *sirfsoc_dma_prep_interleaved(
>> +     struct dma_chan *chan, struct dma_interleaved_template *xt)
>> +{
>> +     struct sirfsoc_dma *sdma = dma_chan_to_sirfsoc_dma(chan);
>> +     struct sirfsoc_dma_chan *schan = dma_chan_to_sirfsoc_dma_chan(chan);
>> +     struct sirfsoc_dma_desc *sdesc = NULL;
>> +     unsigned long iflags;
>> +     int ret;
>> +
>> +     if ((xt->dir != MEM_TO_DEV) || (xt->dir != DEV_TO_MEM)) {
>> +             ret = -EINVAL;
>> +             goto err_dir;
>> +     }
>> +
>> +     /* Get free descriptor */
>> +     spin_lock_irqsave(&schan->lock, iflags);
>> +     if (!list_empty(&schan->free)) {
>> +             sdesc = list_first_entry(&schan->free, struct sirfsoc_dma_desc,
>> +                     node);
>> +             list_del(&sdesc->node);
>> +     }
>> +     spin_unlock_irqrestore(&schan->lock, iflags);
>> +
>> +     if (!sdesc) {
>> +             /* try to free completed descriptors */
>> +             sirfsoc_dma_process_completed(sdma);
>> +             ret = 0;
>> +             goto no_desc;
>> +     }
>> +
>> +     /* Place descriptor in prepared list */
>> +     spin_lock_irqsave(&schan->lock, iflags);
>> +     if ((xt->frame_size == 1) && (xt->numf > 0)) {
> what does this mean?

@numf: Number of frames in this template.
@frame_size: Number of chunks in a frame i.e, size of sgl[].

frame_size==1 means prima2 only support 1 chunk. numf > 0 means
ylen(line number -1) is at least 0 and frame number is at least 1.

>> +             sdesc->cyclic = 0;
>> +             sdesc->xlen = xt->sgl[0].size / 4;
>> +             sdesc->width = (xt->sgl[0].size + xt->sgl[0].icg) / 4;

-barry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-10-17 16:49    [W:0.099 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site