diff options
author | Linus Walleij <linus.walleij@stericsson.com> | 2010-03-26 19:50:49 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2010-03-26 19:50:49 -0400 |
commit | 0793448187643b50af89d36b08470baf45a3cab4 (patch) | |
tree | b3313ff58d47e26a8cf707d196177effa1aadfbe /drivers/dma/ioat/dma.c | |
parent | c3635c78e500a52c9fcd55de381a72928d9e054d (diff) |
DMAENGINE: generic channel status v2
Convert the device_is_tx_complete() operation on the
DMA engine to a generic device_tx_status()operation which
can return three states, DMA_TX_RUNNING, DMA_TX_COMPLETE,
DMA_TX_PAUSED.
[dan.j.williams@intel.com: update for timberdale]
Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Li Yang <leoli@freescale.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Cc: Magnus Damm <damm@opensource.se>
Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Joe Perches <joe@perches.com>
Cc: Roland Dreier <rdreier@cisco.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/ioat/dma.c')
-rw-r--r-- | drivers/dma/ioat/dma.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/dma/ioat/dma.c b/drivers/dma/ioat/dma.c index 0099340b9616..59cebbfc89ec 100644 --- a/drivers/dma/ioat/dma.c +++ b/drivers/dma/ioat/dma.c | |||
@@ -726,18 +726,18 @@ static void ioat1_timer_event(unsigned long data) | |||
726 | } | 726 | } |
727 | 727 | ||
728 | enum dma_status | 728 | enum dma_status |
729 | ioat_is_dma_complete(struct dma_chan *c, dma_cookie_t cookie, | 729 | ioat_dma_tx_status(struct dma_chan *c, dma_cookie_t cookie, |
730 | dma_cookie_t *done, dma_cookie_t *used) | 730 | struct dma_tx_state *txstate) |
731 | { | 731 | { |
732 | struct ioat_chan_common *chan = to_chan_common(c); | 732 | struct ioat_chan_common *chan = to_chan_common(c); |
733 | struct ioatdma_device *device = chan->device; | 733 | struct ioatdma_device *device = chan->device; |
734 | 734 | ||
735 | if (ioat_is_complete(c, cookie, done, used) == DMA_SUCCESS) | 735 | if (ioat_tx_status(c, cookie, txstate) == DMA_SUCCESS) |
736 | return DMA_SUCCESS; | 736 | return DMA_SUCCESS; |
737 | 737 | ||
738 | device->cleanup_fn((unsigned long) c); | 738 | device->cleanup_fn((unsigned long) c); |
739 | 739 | ||
740 | return ioat_is_complete(c, cookie, done, used); | 740 | return ioat_tx_status(c, cookie, txstate); |
741 | } | 741 | } |
742 | 742 | ||
743 | static void ioat1_dma_start_null_desc(struct ioat_dma_chan *ioat) | 743 | static void ioat1_dma_start_null_desc(struct ioat_dma_chan *ioat) |
@@ -857,7 +857,7 @@ int __devinit ioat_dma_self_test(struct ioatdma_device *device) | |||
857 | tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000)); | 857 | tmo = wait_for_completion_timeout(&cmp, msecs_to_jiffies(3000)); |
858 | 858 | ||
859 | if (tmo == 0 || | 859 | if (tmo == 0 || |
860 | dma->device_is_tx_complete(dma_chan, cookie, NULL, NULL) | 860 | dma->device_tx_status(dma_chan, cookie, NULL) |
861 | != DMA_SUCCESS) { | 861 | != DMA_SUCCESS) { |
862 | dev_err(dev, "Self-test copy timed out, disabling\n"); | 862 | dev_err(dev, "Self-test copy timed out, disabling\n"); |
863 | err = -ENODEV; | 863 | err = -ENODEV; |
@@ -1198,7 +1198,7 @@ int __devinit ioat1_dma_probe(struct ioatdma_device *device, int dca) | |||
1198 | dma->device_issue_pending = ioat1_dma_memcpy_issue_pending; | 1198 | dma->device_issue_pending = ioat1_dma_memcpy_issue_pending; |
1199 | dma->device_alloc_chan_resources = ioat1_dma_alloc_chan_resources; | 1199 | dma->device_alloc_chan_resources = ioat1_dma_alloc_chan_resources; |
1200 | dma->device_free_chan_resources = ioat1_dma_free_chan_resources; | 1200 | dma->device_free_chan_resources = ioat1_dma_free_chan_resources; |
1201 | dma->device_is_tx_complete = ioat_is_dma_complete; | 1201 | dma->device_tx_status = ioat_dma_tx_status; |
1202 | 1202 | ||
1203 | err = ioat_probe(device); | 1203 | err = ioat_probe(device); |
1204 | if (err) | 1204 | if (err) |