Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 358526
b: refs/heads/master
c: 77bcc49
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Vinod Koul committed Jan 21, 2013
1 parent 3ce677d commit 972f1b6
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5be10f349bc0a2f3dd2ab6417ffe29746403984c
refs/heads/master: 77bcc497c60ec62dbb84abc809a6e218d53409e9
43 changes: 21 additions & 22 deletions trunk/drivers/dma/dw_dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,20 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
if (status_xfer & dwc->mask) {
/* Everything we've submitted is done */
dma_writel(dw, CLEAR.XFER, dwc->mask);

if (test_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags)) {
if (dwc->tx_node_active != dwc->tx_list) {
desc = to_dw_desc(dwc->tx_node_active);

/* Submit next block */
dwc_do_single_block(dwc, desc);
spin_unlock_irqrestore(&dwc->lock, flags);

return;
}
/* We are done here */
clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags);
}
spin_unlock_irqrestore(&dwc->lock, flags);

dwc_complete_all(dw, dwc);
Expand All @@ -411,6 +425,12 @@ static void dwc_scan_descriptors(struct dw_dma *dw, struct dw_dma_chan *dwc)
return;
}

if (test_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags)) {
dev_vdbg(chan2dev(&dwc->chan), "%s: soft LLP mode\n", __func__);
spin_unlock_irqrestore(&dwc->lock, flags);
return;
}

dev_vdbg(chan2dev(&dwc->chan), "%s: llp=0x%llx\n", __func__,
(unsigned long long)llp);

Expand Down Expand Up @@ -596,29 +616,8 @@ static void dw_dma_tasklet(unsigned long data)
dwc_handle_cyclic(dw, dwc, status_err, status_xfer);
else if (status_err & (1 << i))
dwc_handle_error(dw, dwc);
else if (status_xfer & (1 << i)) {
unsigned long flags;

spin_lock_irqsave(&dwc->lock, flags);
if (test_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags)) {
if (dwc->tx_node_active != dwc->tx_list) {
struct dw_desc *desc =
to_dw_desc(dwc->tx_node_active);

dma_writel(dw, CLEAR.XFER, dwc->mask);

dwc_do_single_block(dwc, desc);

spin_unlock_irqrestore(&dwc->lock, flags);
continue;
}
/* we are done here */
clear_bit(DW_DMA_IS_SOFT_LLP, &dwc->flags);
}
spin_unlock_irqrestore(&dwc->lock, flags);

else if (status_xfer & (1 << i))
dwc_scan_descriptors(dw, dwc);
}
}

/*
Expand Down

0 comments on commit 972f1b6

Please sign in to comment.