aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/fsldma.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2008-04-17 23:17:26 -0400
committerDan Williams <dan.j.williams@intel.com>2008-04-17 16:25:54 -0400
commit636bdeaa1243327501edfd2a597ed7443eb4239a (patch)
tree59b894f124e3664ea4a537d7c07c527abdb9c8da /drivers/dma/fsldma.c
parentc4fe15541d0ef5cc8cc1ce43057663851f8fc387 (diff)
dmaengine: ack to flags: make use of the unused bits in the 'ack' field
'ack' is currently a simple integer that flags whether or not a client is done touching fields in the given descriptor. It is effectively just a single bit of information. Converting this to a flags parameter allows the other bits to be put to use to control completion actions, like dma-unmap, and capture results, like xor-zero-sum == 0. Changes are one of: 1/ convert all open-coded ->ack manipulations to use async_tx_ack and async_tx_test_ack. 2/ set the ack bit at prep time where possible 3/ make drivers store the flags at prep time 4/ add flags to the device_prep_dma_interrupt prototype Acked-by: Maciej Sosnowski <maciej.sosnowski@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/dma/fsldma.c')
-rw-r--r--drivers/dma/fsldma.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 95b36b7934a5..054eabffc185 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -412,7 +412,7 @@ static void fsl_dma_free_chan_resources(struct dma_chan *chan)
412} 412}
413 413
414static struct dma_async_tx_descriptor * 414static struct dma_async_tx_descriptor *
415fsl_dma_prep_interrupt(struct dma_chan *chan) 415fsl_dma_prep_interrupt(struct dma_chan *chan, unsigned long flags)
416{ 416{
417 struct fsl_dma_chan *fsl_chan; 417 struct fsl_dma_chan *fsl_chan;
418 struct fsl_desc_sw *new; 418 struct fsl_desc_sw *new;
@@ -429,7 +429,7 @@ fsl_dma_prep_interrupt(struct dma_chan *chan)
429 } 429 }
430 430
431 new->async_tx.cookie = -EBUSY; 431 new->async_tx.cookie = -EBUSY;
432 new->async_tx.ack = 0; 432 new->async_tx.flags = flags;
433 433
434 /* Insert the link descriptor to the LD ring */ 434 /* Insert the link descriptor to the LD ring */
435 list_add_tail(&new->node, &new->async_tx.tx_list); 435 list_add_tail(&new->node, &new->async_tx.tx_list);
@@ -482,7 +482,7 @@ static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy(
482 set_desc_next(fsl_chan, &prev->hw, new->async_tx.phys); 482 set_desc_next(fsl_chan, &prev->hw, new->async_tx.phys);
483 483
484 new->async_tx.cookie = 0; 484 new->async_tx.cookie = 0;
485 new->async_tx.ack = 1; 485 async_tx_ack(&new->async_tx);
486 486
487 prev = new; 487 prev = new;
488 len -= copy; 488 len -= copy;
@@ -493,7 +493,7 @@ static struct dma_async_tx_descriptor *fsl_dma_prep_memcpy(
493 list_add_tail(&new->node, &first->async_tx.tx_list); 493 list_add_tail(&new->node, &first->async_tx.tx_list);
494 } while (len); 494 } while (len);
495 495
496 new->async_tx.ack = 0; /* client is in control of this ack */ 496 new->async_tx.flags = flags; /* client is in control of this ack */
497 new->async_tx.cookie = -EBUSY; 497 new->async_tx.cookie = -EBUSY;
498 498
499 /* Set End-of-link to the last link descriptor of new list*/ 499 /* Set End-of-link to the last link descriptor of new list*/
@@ -874,7 +874,7 @@ static int fsl_dma_self_test(struct fsl_dma_chan *fsl_chan)
874 async_tx_ack(tx3); 874 async_tx_ack(tx3);
875 875
876 /* Interrupt tx test */ 876 /* Interrupt tx test */
877 tx1 = fsl_dma_prep_interrupt(chan); 877 tx1 = fsl_dma_prep_interrupt(chan, 0);
878 async_tx_ack(tx1); 878 async_tx_ack(tx1);
879 cookie = fsl_dma_tx_submit(tx1); 879 cookie = fsl_dma_tx_submit(tx1);
880 880