SDOCM00113018: Fix issue with using "large" channels to perform regular non-linked...
authorJacob Stiffler <j-stiffler@ti.com>
Tue, 23 Sep 2014 11:50:38 +0000 (07:50 -0400)
committerChris Ring <cring@ti.com>
Wed, 1 Oct 2014 19:22:40 +0000 (12:22 -0700)
When using large EdmaMgr channels for regular transfers, EdmaMgr would wait on
the chained EDMA channel even though it was not being used.

This corrects that by setting "xferPending" on the chained channel only when it
is being used, thus allowing large EdmaMgr channels to be used for regular
non-linked transfers.

Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
packages/ti/sdo/fc/edmamgr/edmamgr_xfer.h

index ae1b6559943734a60f779f162d5bb54d17a1d8a6..c789e1577a0d8d77af0efca30953d82c4736b032 100644 (file)
@@ -67,8 +67,10 @@ void EdmaMgr_wait(EdmaMgr_Handle h)
   if (edmamgrChan->xferPending) {
     ECPY_directWait(edmamgrChan->ecpyHandle);
 
-    if ( edmamgrChan->chainedChannel )
+    if ( edmamgrChan->chainedChannel && edmamgrChan->chainedChannel->xferPending ) {
       ECPY_directWait(edmamgrChan->chainedChannel->ecpyHandle);
+      edmamgrChan->chainedChannel->xferPending = FALSE;
+    }
 
     edmamgrChan->xferPending = FALSE;
   }
@@ -877,6 +879,7 @@ int32_t EdmaMgr_copy1D2DLarge
     paRam = (IRES_EDMA3CHAN_PaRamStruct *)edmamgrChan->chainedChannel->edmaHandle->assignedPaRamAddresses[0];
     paRam->opt = edmamgrChan->chainedChannel->optChained;
 
+    edmamgrChan->chainedChannel->xferPending = TRUE;
   }
 
   /* Initiate transfer */
@@ -1057,6 +1060,7 @@ int32_t EdmaMgr_copy2D1DLarge
     paRam = (IRES_EDMA3CHAN_PaRamStruct *)edmamgrChan->chainedChannel->edmaHandle->assignedPaRamAddresses[0];
     paRam->opt = edmamgrChan->chainedChannel->optChained;
 
+    edmamgrChan->chainedChannel->xferPending = TRUE;
   }
 
   /* Initiate transfer */