]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/dma/at_xdmac.c
dmaengine: at_xdmac: fix software lockup at_xdmac_tx_status()
authorCyrille Pitchen <cyrille.pitchen@atmel.com>
Thu, 13 Nov 2014 10:52:41 +0000 (11:52 +0100)
committerVinod Koul <vinod.koul@intel.com>
Mon, 17 Nov 2014 08:37:20 +0000 (14:07 +0530)
commit4e0978208d67730a316066911201a6252158d2fd
tree05341217bedf4933e44f47ab2e4157a13b048e62
parent77e6c9bfaa622183c5fe9aa23be4822dd21038d1
dmaengine: at_xdmac: fix software lockup at_xdmac_tx_status()

According to the Atmel eXtended DMA controller datasheet, requesting a
DMA transfer flush for a channel is only revelant when this transfer is
source peripheral synchronized.

So we have to check this condition before requesting a channel flush by
writing the channel bit into the Global channel SoftWare Flush (GSWF)
register then waiting for flush to complete by monitoring the end of
Flush Interrupt Status (FIS) bit in the Channel Interrupt Status (CIS)
register.

Indeed, for non source peripheral synchronized transfer, writing the
channel bit into the GSWF register does nothing. Especially, the FIS bit
is never set into the CIS register. The former code looped forever
waiting for this bit to be set.

Signed-off-by: Cyrille Pitchen <cyrille.pitchen@atmel.com>
Signed-off-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/at_xdmac.c