• Cyrille Pitchen's avatar
    dmaengine: at_xdmac: fix software lockup at_xdmac_tx_status() · 4e097820
    Cyrille Pitchen authored
    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: default avatarCyrille Pitchen <cyrille.pitchen@atmel.com>
    Signed-off-by: default avatarLudovic Desroches <ludovic.desroches@atmel.com>
    Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
    4e097820
at_xdmac.c 48.4 KB