dma: cppi41: add a delay while setting the TD bit
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Wed, 3 Dec 2014 14:09:50 +0000 (15:09 +0100)
committerVinod Koul <vinod.koul@intel.com>
Tue, 9 Dec 2014 09:15:41 +0000 (14:45 +0530)
commit754416e10beb067e0bb473e00bf210c6f268e666
treef32d3c58ee2589733e971b0a21209358051484fe
parent6f9d70568f3128411c49dd049498d0c13cd3bbc1
dma: cppi41: add a delay while setting the TD bit

The manual says that we need to (repeatedly) set the TearDown-bit for
the endpoint in order to get the active transfer descriptor released.
Doing this "real" quick over and over again seems to work but it also
seems that the hardware might not have enough time to breathe. So I
though, hey lets add a udelay() between between the individual sets
of the bit.
This change with the g_zero testcase resulted in a warning about missing
transfer descriptor (we got the tear-down one). It seems that if the
hardware has some time it manages to release the transfer-descriptor on
the completion queue after the teaddown descriptor.
With this change, I observe that the transfer descriptor is released
after 20-30 retry loops.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/cppi41.c