diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:36:56 -0400 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2010-05-22 02:36:56 -0400 |
commit | cf9b59e9d3e008591d1f54830f570982bb307a0d (patch) | |
tree | 113478ce8fd8c832ba726ffdf59b82cb46356476 /drivers/dma/fsldma.c | |
parent | 44504b2bebf8b5823c59484e73096a7d6574471d (diff) | |
parent | f4b87dee923342505e1ddba8d34ce9de33e75050 (diff) |
Merge remote branch 'origin' into secretlab/next-devicetree
Merging in current state of Linus' tree to deal with merge conflicts and
build failures in vio.c after merge.
Conflicts:
drivers/i2c/busses/i2c-cpm.c
drivers/i2c/busses/i2c-mpc.c
drivers/net/gianfar.c
Also fixed up one line in arch/powerpc/kernel/vio.c to use the
correct node pointer.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/dma/fsldma.c')
-rw-r--r-- | drivers/dma/fsldma.c | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c index c3d74697f5a9..8088b14ba5f7 100644 --- a/drivers/dma/fsldma.c +++ b/drivers/dma/fsldma.c | |||
@@ -775,13 +775,18 @@ fail: | |||
775 | return NULL; | 775 | return NULL; |
776 | } | 776 | } |
777 | 777 | ||
778 | static void fsl_dma_device_terminate_all(struct dma_chan *dchan) | 778 | static int fsl_dma_device_control(struct dma_chan *dchan, |
779 | enum dma_ctrl_cmd cmd, unsigned long arg) | ||
779 | { | 780 | { |
780 | struct fsldma_chan *chan; | 781 | struct fsldma_chan *chan; |
781 | unsigned long flags; | 782 | unsigned long flags; |
782 | 783 | ||
784 | /* Only supports DMA_TERMINATE_ALL */ | ||
785 | if (cmd != DMA_TERMINATE_ALL) | ||
786 | return -ENXIO; | ||
787 | |||
783 | if (!dchan) | 788 | if (!dchan) |
784 | return; | 789 | return -EINVAL; |
785 | 790 | ||
786 | chan = to_fsl_chan(dchan); | 791 | chan = to_fsl_chan(dchan); |
787 | 792 | ||
@@ -795,6 +800,8 @@ static void fsl_dma_device_terminate_all(struct dma_chan *dchan) | |||
795 | fsldma_free_desc_list(chan, &chan->ld_running); | 800 | fsldma_free_desc_list(chan, &chan->ld_running); |
796 | 801 | ||
797 | spin_unlock_irqrestore(&chan->desc_lock, flags); | 802 | spin_unlock_irqrestore(&chan->desc_lock, flags); |
803 | |||
804 | return 0; | ||
798 | } | 805 | } |
799 | 806 | ||
800 | /** | 807 | /** |
@@ -965,13 +972,12 @@ static void fsl_dma_memcpy_issue_pending(struct dma_chan *dchan) | |||
965 | } | 972 | } |
966 | 973 | ||
967 | /** | 974 | /** |
968 | * fsl_dma_is_complete - Determine the DMA status | 975 | * fsl_tx_status - Determine the DMA status |
969 | * @chan : Freescale DMA channel | 976 | * @chan : Freescale DMA channel |
970 | */ | 977 | */ |
971 | static enum dma_status fsl_dma_is_complete(struct dma_chan *dchan, | 978 | static enum dma_status fsl_tx_status(struct dma_chan *dchan, |
972 | dma_cookie_t cookie, | 979 | dma_cookie_t cookie, |
973 | dma_cookie_t *done, | 980 | struct dma_tx_state *txstate) |
974 | dma_cookie_t *used) | ||
975 | { | 981 | { |
976 | struct fsldma_chan *chan = to_fsl_chan(dchan); | 982 | struct fsldma_chan *chan = to_fsl_chan(dchan); |
977 | dma_cookie_t last_used; | 983 | dma_cookie_t last_used; |
@@ -982,11 +988,7 @@ static enum dma_status fsl_dma_is_complete(struct dma_chan *dchan, | |||
982 | last_used = dchan->cookie; | 988 | last_used = dchan->cookie; |
983 | last_complete = chan->completed_cookie; | 989 | last_complete = chan->completed_cookie; |
984 | 990 | ||
985 | if (done) | 991 | dma_set_tx_state(txstate, last_complete, last_used, 0); |
986 | *done = last_complete; | ||
987 | |||
988 | if (used) | ||
989 | *used = last_used; | ||
990 | 992 | ||
991 | return dma_async_is_complete(cookie, last_complete, last_used); | 993 | return dma_async_is_complete(cookie, last_complete, last_used); |
992 | } | 994 | } |
@@ -1330,10 +1332,10 @@ static int __devinit fsldma_of_probe(struct of_device *op, | |||
1330 | fdev->common.device_free_chan_resources = fsl_dma_free_chan_resources; | 1332 | fdev->common.device_free_chan_resources = fsl_dma_free_chan_resources; |
1331 | fdev->common.device_prep_dma_interrupt = fsl_dma_prep_interrupt; | 1333 | fdev->common.device_prep_dma_interrupt = fsl_dma_prep_interrupt; |
1332 | fdev->common.device_prep_dma_memcpy = fsl_dma_prep_memcpy; | 1334 | fdev->common.device_prep_dma_memcpy = fsl_dma_prep_memcpy; |
1333 | fdev->common.device_is_tx_complete = fsl_dma_is_complete; | 1335 | fdev->common.device_tx_status = fsl_tx_status; |
1334 | fdev->common.device_issue_pending = fsl_dma_memcpy_issue_pending; | 1336 | fdev->common.device_issue_pending = fsl_dma_memcpy_issue_pending; |
1335 | fdev->common.device_prep_slave_sg = fsl_dma_prep_slave_sg; | 1337 | fdev->common.device_prep_slave_sg = fsl_dma_prep_slave_sg; |
1336 | fdev->common.device_terminate_all = fsl_dma_device_terminate_all; | 1338 | fdev->common.device_control = fsl_dma_device_control; |
1337 | fdev->common.dev = &op->dev; | 1339 | fdev->common.dev = &op->dev; |
1338 | 1340 | ||
1339 | dev_set_drvdata(&op->dev, fdev); | 1341 | dev_set_drvdata(&op->dev, fdev); |