dma: pl330: Differentiate between submitted and issued descriptors
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 11 Jan 2014 19:08:38 +0000 (20:08 +0100)
committerVinod Koul <vinod.koul@intel.com>
Mon, 20 Jan 2014 08:20:49 +0000 (13:50 +0530)
commit04abf5daf7df852566e5a4782d5954daa40e2542
tree8bee95188e65e2264633a8ec9ee8bb8bc898913f
parentba07d812f58c0ec65fff981a085529ed88965d23
dma: pl330: Differentiate between submitted and issued descriptors

The pl330 dmaengine driver currently does not differentiate between submitted
and issued descriptors. It won't start transferring a newly submitted
descriptor until issue_pending() is called, but only if it is idle. If it is
active and a new descriptor is submitted before it goes idle it will happily
start the newly submitted descriptor once all earlier submitted descriptors have
been completed. This is not a 100% correct with regards to the dmaengine
interface semantics. A descriptor is not supposed to be started until the next
issue_pending() call after the descriptor has been submitted. This patch adds a
second per channel list that keeps track of the submitted descriptors. Once
issue_pending() is called the submitted descriptors are moved to the working
list and only descriptors on the working list are started.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/pl330.c