aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/dw_dmac.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2013-01-25 04:48:00 -0500
committerVinod Koul <vinod.koul@intel.com>2013-01-28 07:04:32 -0500
commitfdf475fa40f1468cf43a72b270f74dc6a4a5c905 (patch)
tree89760fdfe1e8035191321ca78835bc1f92c39045 /drivers/dma/dw_dmac.c
parent985a6c7dcf309378b91d16cdbdb0909479f99c33 (diff)
dw_dmac: remove unnecessary tx_list field in dw_dma_chan
The soft LLP mode is working for active descriptor only. So, we do not need to have a copy of its pointer. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/dw_dmac.c')
-rw-r--r--drivers/dma/dw_dmac.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
index ddd3ad2a96a3..721beafe8f7a 100644
--- a/drivers/dma/dw_dmac.c
+++ b/drivers/dma/dw_dmac.c
@@ -282,9 +282,9 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first)
282 282
283 dwc_initialize(dwc); 283 dwc_initialize(dwc);
284 284
285 dwc->tx_list = &first->tx_list;
286 dwc->tx_node_active = &first->tx_list; 285 dwc->tx_node_active = &first->tx_list;
287 286
287 /* Submit first block */
288 dwc_do_single_block(dwc, first); 288 dwc_do_single_block(dwc, first);
289 289
290 return; 290 return;
@@ -402,15 +402,25 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
402 dma_writel(dw, CLEAR.XFER, dwc->mask); 402 dma_writel(dw, CLEAR.XFER, dwc->mask);
403 403
404 if (test_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags)) { 404 if (test_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags)) {
405 if (dwc->tx_node_active != dwc->tx_list) { 405 struct list_head *head, *active = dwc->tx_node_active;
406 desc = to_dw_desc(dwc->tx_node_active); 406
407 /*
408 * We are inside first active descriptor.
409 * Otherwise something is really wrong.
410 */
411 desc = dwc_first_active(dwc);
412
413 head = &desc->tx_list;
414 if (active != head) {
415 child = to_dw_desc(active);
407 416
408 /* Submit next block */ 417 /* Submit next block */
409 dwc_do_single_block(dwc, desc); 418 dwc_do_single_block(dwc, child);
410 spin_unlock_irqrestore(&dwc->lock, flags);
411 419
420 spin_unlock_irqrestore(&dwc->lock, flags);
412 return; 421 return;
413 } 422 }
423
414 /* We are done here */ 424 /* We are done here */
415 clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags); 425 clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags);
416 } 426 }