diff options
Diffstat (limited to 'drivers/dma')
-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 { | |||
70 | int cyclic; | 70 | int cyclic; |
71 | int absync; | 71 | int absync; |
72 | int pset_nr; | 72 | int pset_nr; |
73 | struct edma_chan *echan; | ||
73 | int processed; | 74 | int processed; |
75 | |||
76 | /* | ||
77 | * The following 4 elements are used for residue accounting. | ||
78 | * | ||
79 | * - processed_stat: the number of SG elements we have traversed | ||
80 | * so far to cover accounting. This is updated directly to processed | ||
81 | * during edma_callback and is always <= processed, because processed | ||
82 | * refers to the number of pending transfer (programmed to EDMA | ||
83 | * controller), where as processed_stat tracks number of transfers | ||
84 | * accounted for so far. | ||
85 | * | ||
86 | * - residue: The amount of bytes we have left to transfer for this desc | ||
87 | * | ||
88 | * - residue_stat: The residue in bytes of data we have covered | ||
89 | * so far for accounting. This is updated directly to residue | ||
90 | * during callbacks to keep it current. | ||
91 | * | ||
92 | * - sg_len: Tracks the length of the current intermediate transfer, | ||
93 | * this is required to update the residue during intermediate transfer | ||
94 | * completion callback. | ||
95 | */ | ||
74 | int processed_stat; | 96 | int processed_stat; |
75 | u32 residue; | ||
76 | u32 sg_len; | 97 | u32 sg_len; |
98 | u32 residue; | ||
77 | u32 residue_stat; | 99 | u32 residue_stat; |
78 | struct edma_chan *echan; | 100 | |
79 | struct edma_pset pset[0]; | 101 | struct edma_pset pset[0]; |
80 | }; | 102 | }; |
81 | 103 | ||