Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1443417
| From | Peter Ujfalusi <peter.ujfalusi@ti.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/7] dmaengine: omap-dma: Simplify omap_dma_start_sg parameter list |
| Date | 2016-07-14 14:50 +0200 |
| Message-ID | <rUOfw-1kh-7@gated-at.bofh.it> (permalink) |
| References | <rUOfv-1kh-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
We can drop the (sg)idx parameter for the omap_dma_start_sg() function and
increment the sgidx inside of the same function.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
drivers/dma/omap-dma.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
index 2e0d49bcfd8a..7d56cd88c9a5 100644
--- a/drivers/dma/omap-dma.c
+++ b/drivers/dma/omap-dma.c
@@ -365,10 +365,9 @@ static void omap_dma_stop(struct omap_chan *c)
c->running = false;
}
-static void omap_dma_start_sg(struct omap_chan *c, struct omap_desc *d,
- unsigned idx)
+static void omap_dma_start_sg(struct omap_chan *c, struct omap_desc *d)
{
- struct omap_sg *sg = d->sg + idx;
+ struct omap_sg *sg = d->sg + c->sgidx;
unsigned cxsa, cxei, cxfi;
if (d->dir == DMA_DEV_TO_MEM || d->dir == DMA_MEM_TO_MEM) {
@@ -388,6 +387,7 @@ static void omap_dma_start_sg(struct omap_chan *c, struct omap_desc *d,
omap_dma_chan_write(c, CFN, sg->fn);
omap_dma_start(c, d);
+ c->sgidx++;
}
static void omap_dma_start_desc(struct omap_chan *c)
@@ -433,7 +433,7 @@ static void omap_dma_start_desc(struct omap_chan *c)
omap_dma_chan_write(c, CSDP, d->csdp);
omap_dma_chan_write(c, CLNK_CTRL, d->clnk_ctrl);
- omap_dma_start_sg(c, d, 0);
+ omap_dma_start_sg(c, d);
}
static void omap_dma_callback(int ch, u16 status, void *data)
@@ -446,8 +446,8 @@ static void omap_dma_callback(int ch, u16 status, void *data)
d = c->desc;
if (d) {
if (!c->cyclic) {
- if (++c->sgidx < d->sglen) {
- omap_dma_start_sg(c, d, c->sgidx);
+ if (c->sgidx < d->sglen) {
+ omap_dma_start_sg(c, d);
} else {
omap_dma_start_desc(c);
vchan_cookie_complete(&d->vd);
--
2.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/7] dmaengine:omap-dma: Linked List transfer for slave_sg Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-14 14:50 +0200
[PATCH 1/7] dmaengine: omap-dma: Simplify omap_dma_start_sg parameter list Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-14 14:50 +0200
[PATCH 7/7] dmaengine: omap-dma: Support for LinkedList transfer of slave_sg Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-14 14:50 +0200
Re: [PATCH 7/7] dmaengine: omap-dma: Support for LinkedList transfer of slave_sg Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-07-18 12:50 +0200
Re: [PATCH 7/7] dmaengine: omap-dma: Support for LinkedList transfer of slave_sg Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-18 13:20 +0200
[PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-14 14:50 +0200
Re: [PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-07-18 12:40 +0200
Re: [PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-19 14:40 +0200
Re: [PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-07-19 18:30 +0200
Re: [PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-19 21:30 +0200
Re: [PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Vinod Koul <vinod.koul@intel.com> - 2016-07-24 09:40 +0200
Re: [PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Robert Jarzmik <robert.jarzmik@free.fr> - 2016-07-20 08:30 +0200
Re: [PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-21 11:40 +0200
Re: [PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-21 11:40 +0200
Re: [PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-07-21 11:50 +0200
Re: [PATCH 2/7] dmaengine: omap-dma: Complete the cookie first on transfer completion Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-22 13:10 +0200
[PATCH 4/7] dmaengine: omap-dma: Dynamically allocate memory for lch_map Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-14 14:50 +0200
[PATCH 6/7] dmaengine: omap-dma: Use pointer to omap_sg in slave_sg setup's loop Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-14 14:50 +0200
Re: [PATCH 0/7] dmaengine:omap-dma: Linked List transfer for slave_sg Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-07-18 12:40 +0200
Re: [PATCH 0/7] dmaengine:omap-dma: Linked List transfer for slave_sg Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-18 14:10 +0200
Re: [PATCH 0/7] dmaengine:omap-dma: Linked List transfer for slave_sg Russell King - ARM Linux <linux@armlinux.org.uk> - 2016-07-18 14:30 +0200
Re: [PATCH 0/7] dmaengine:omap-dma: Linked List transfer for slave_sg Peter Ujfalusi <peter.ujfalusi@ti.com> - 2016-07-18 14:40 +0200
csiph-web