Message ID | 52669A23.2080805@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Oct 22, 2013 at 10:30:43AM -0500, Joel Fernandes wrote: > On 10/21/2013 01:53 AM, Vinod Koul wrote: > > On Mon, Sep 23, 2013 at 06:05:14PM -0500, Joel Fernandes wrote: > >> + nr_periods = (buf_len / period_len) + 1; > > ? > > > > consider the case of buf = period_len, above makes nr_period = 2. > > > > Or buf len 100, period len 50, makes nr_period = 3 > > > > Both doesnt seem right to me? > > I guess that variable name is misleading. > > nr_periods is actually the total no.of slots needed to process the request. Its > value is 1 greater than the total number of periods. Okay sounds good to me. I tried applying below but looks like it fails as I have already applied, 1 & 3. Can you pls rebase this resend -- ~Vinod -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 9b6004f..0fef450 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -54,6 +54,7 @@ struct edma_desc { struct virt_dma_desc vdesc; struct list_head node; + int cyclic; int absync; int pset_nr; int processed; @@ -167,8 +168,13 @@ static void edma_execute(struct edma_chan *echan) * then setup a link to the dummy slot, this results in all future * events being absorbed and that's OK because we're done */ - if (edesc->processed == edesc->pset_nr) - edma_link(echan->slot[nslots-1], echan->ecc->dummy_slot); + if (edesc->processed == edesc->pset_nr) { + if (edesc->cyclic) + edma_link(echan->slot[nslots-1], echan->slot[1]); + else + edma_link(echan->slot[nslots-1], + echan->ecc->dummy_slot); + } edma_resume(echan->ch_num); @@ -253,6 +259,7 @@ static int edma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd, /* * A PaRAM set configuration abstraction used by other modes * @chan: Channel who's PaRAM set we're configuring + * @pset: PaRAM set to initialize and setup. * @src_addr: Source address of the DMA * @dst_addr: Destination address of the DMA