diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2013-01-09 03:17:13 -0500 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-01-09 09:30:59 -0500 |
commit | f5c6a7df35b04db906577e90fa5e133e56433bcf (patch) | |
tree | dd444985a0c76cf282e4142331506731e8bf2555 /drivers/dma | |
parent | 21e93c1e7dae0e8b1914a522c331f0f7763fa89d (diff) |
dw_dmac: update tx_node_active in dwc_do_single_block
The "else" keyword in the dw_dma_tasklet is removed as well. All together
simplifies the logic of the code and understanding of what is happening there.
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')
-rw-r--r-- | drivers/dma/dw_dmac.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index c74a7ec9bb9f..d6b322a1f565 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -247,6 +247,9 @@ static inline void dwc_do_single_block(struct dw_dma_chan *dwc, | |||
247 | channel_writel(dwc, CTL_LO, ctllo); | 247 | channel_writel(dwc, CTL_LO, ctllo); |
248 | channel_writel(dwc, CTL_HI, desc->lli.ctlhi); | 248 | channel_writel(dwc, CTL_HI, desc->lli.ctlhi); |
249 | channel_set_bit(dw, CH_EN, dwc->mask); | 249 | channel_set_bit(dw, CH_EN, dwc->mask); |
250 | |||
251 | /* Move pointer to next descriptor */ | ||
252 | dwc->tx_node_active = dwc->tx_node_active->next; | ||
250 | } | 253 | } |
251 | 254 | ||
252 | /* Called with dwc->lock held and bh disabled */ | 255 | /* Called with dwc->lock held and bh disabled */ |
@@ -278,7 +281,7 @@ static void dwc_dostart(struct dw_dma_chan *dwc, struct dw_desc *first) | |||
278 | dwc_initialize(dwc); | 281 | dwc_initialize(dwc); |
279 | 282 | ||
280 | dwc->tx_list = &first->tx_list; | 283 | dwc->tx_list = &first->tx_list; |
281 | dwc->tx_node_active = first->tx_list.next; | 284 | dwc->tx_node_active = &first->tx_list; |
282 | 285 | ||
283 | dwc_do_single_block(dwc, first); | 286 | dwc_do_single_block(dwc, first); |
284 | 287 | ||
@@ -604,18 +607,13 @@ static void dw_dma_tasklet(unsigned long data) | |||
604 | 607 | ||
605 | dma_writel(dw, CLEAR.XFER, dwc->mask); | 608 | dma_writel(dw, CLEAR.XFER, dwc->mask); |
606 | 609 | ||
607 | /* move pointer to next descriptor */ | ||
608 | dwc->tx_node_active = | ||
609 | dwc->tx_node_active->next; | ||
610 | |||
611 | dwc_do_single_block(dwc, desc); | 610 | dwc_do_single_block(dwc, desc); |
612 | 611 | ||
613 | spin_unlock_irqrestore(&dwc->lock, flags); | 612 | spin_unlock_irqrestore(&dwc->lock, flags); |
614 | continue; | 613 | continue; |
615 | } else { | ||
616 | /* we are done here */ | ||
617 | clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags); | ||
618 | } | 614 | } |
615 | /* we are done here */ | ||
616 | clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags); | ||
619 | } | 617 | } |
620 | spin_unlock_irqrestore(&dwc->lock, flags); | 618 | spin_unlock_irqrestore(&dwc->lock, flags); |
621 | 619 | ||