Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7d604663 authored by Robert Jarzmik's avatar Robert Jarzmik Committed by Vinod Koul
Browse files

dmaengine: pxa_dma: implement device_synchronize



Implement the function which wait until a dma channel is stopped to have
a synchronization point.

This also protects the pxad_remove() from races, such as spurious
interrupts while removing the driver, because :
 - as long as there is one dma channel requested, ie. dma_chan_get() but
   no dma_chan_put(), the try_module_get() of dma_chan_get() prevents
   the remove() routine from running
 - when the last channel is released, ie. the last dma_chan_put() is
   called, if there is a running DMA, pxad_synchronize() is called
 - pxad_synchronize() waits for the channel to stop, which in turn
   ensures on pxa architecture that the interrupt cannot be fired anymore

Reported-by: default avatarVinod Koul <vinod.koul@intel.com>
Signed-off-by: default avatarRobert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 0d605ba0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment