diff options
author | Joel Fernandes <joelf@ti.com> | 2014-04-28 22:19:31 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-04-30 07:06:41 +0200 |
commit | 04361d887fc5d217bcb9cbd3c32980cdc34dc91f (patch) | |
tree | a31d694c24a00ffa670d454fb44613b0a2b5e57f /drivers/dma/edma.c | |
parent | dmaengine: edma: Provide granular accounting (diff) | |
download | linux-04361d887fc5d217bcb9cbd3c32980cdc34dc91f.tar.xz linux-04361d887fc5d217bcb9cbd3c32980cdc34dc91f.zip |
dmaengine: edma: Document variables used for residue accounting
The granular residue accounting code uses certain variables specifically
for residue accounting. Document these in the structure declaration.
Also move around some elements and group them together.
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Joel Fernandes <joelf@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/dma/edma.c | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index 5d9f57f27ffb..18c833fa1646 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -70,12 +70,34 @@ struct edma_desc { int cyclic; int absync; int pset_nr; + struct edma_chan *echan; int processed; + + /* + * The following 4 elements are used for residue accounting. + * + * - processed_stat: the number of SG elements we have traversed + * so far to cover accounting. This is updated directly to processed + * during edma_callback and is always <= processed, because processed + * refers to the number of pending transfer (programmed to EDMA + * controller), where as processed_stat tracks number of transfers + * accounted for so far. + * + * - residue: The amount of bytes we have left to transfer for this desc + * + * - residue_stat: The residue in bytes of data we have covered + * so far for accounting. This is updated directly to residue + * during callbacks to keep it current. + * + * - sg_len: Tracks the length of the current intermediate transfer, + * this is required to update the residue during intermediate transfer + * completion callback. + */ int processed_stat; - u32 residue; u32 sg_len; + u32 residue; u32 residue_stat; - struct edma_chan *echan; + struct edma_pset pset[0]; }; |