summaryrefslogtreecommitdiff
path: root/drivers/spmi
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2014-04-28 14:34:11 -0500
committerVinod Koul <vinod.koul@intel.com>2014-04-30 10:36:03 +0530
commit740b41f7882162fc9339262b020757b741c4f1ac (patch)
tree29c56685e4a9763a2174ba9c2c3d6fdac535cc19 /drivers/spmi
parentcdae05a0f0f7d15837dfd6f4200e8caea03c9cbf (diff)
downloadlinux-next-740b41f7882162fc9339262b020757b741c4f1ac.tar.gz
dmaengine: edma: Provide granular accounting
The first slot in the ParamRAM of EDMA holds the current active subtransfer. Depending on the direction we read either the source or the destination address from there. In the internal psets we have the address of the buffer(s). In the cyclic case we only use the internal pset[0] which holds the start address of the circular buffer and calculate the remaining room to the end of the buffer. In the SG case we read the current address and compare it to the internal psets address and length. - If the current address is outside of this range, the pset has been processed already and we mark it done, update the residue_stat value and process the next set. That avoids that we need to walk all processed psets for every invocation of tx_status. - If its inside the range we know that we look at the current active set and stop the walk. - In case of intermediate transfers we update the stats in the interrupt callback function before starting the next batch of transfers. The tx_status callback and the interrupt callback are serialized via vchan.lock. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> [joelf@ti.com: Hunk #2 in original patch manually applied] Signed-off-by: Joel Fernandes <joelf@ti.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/spmi')
0 files changed, 0 insertions, 0 deletions