BugFix: SDOCM00113131
authorPrasad <prasadkonnur@ti.com>
Mon, 6 Oct 2014 11:27:54 +0000 (16:57 +0530)
committerSunil MS <x0190988@ti.com>
Tue, 14 Oct 2014 09:21:05 +0000 (14:51 +0530)
edma doesnot allocate first few PaRAMs
even though Fixed mapping doesnot exist between DMA Channel and PaRAMs.

Change-Id: Ifc42e7755c6576b21c04a996b82eecb69b0fbcb6
Signed-off-by: Prasad <prasadkonnur@ti.com>
packages/ti/sdo/edma3/rm/src/edma3resmgr.c

index 3bec7019e42dc840b5c41eeb4fd5deab2161c28f..d8dff94e860dbb0a17271549b87bfaecc8067af0 100755 (executable)
@@ -887,10 +887,23 @@ EDMA3_RM_Handle EDMA3_RM_open (uint32_t phyCtrllerInstId,
                      * will not be returned in case user requests for ANY link
                      * channel.
                      */
+                    if (FALSE == rmObj->gblCfgParams.dmaChPaRAMMapExists)
+                    {
                     for (resMgrIdx = 0U; resMgrIdx < rmObj->gblCfgParams.numDmaChannels; ++resMgrIdx)
                         {
                         rmInstance->initParam.rmInstInitConfig->resvdPaRAMSets[resMgrIdx/32U] |= ((uint32_t)1U<<(resMgrIdx%32U));
                         }
+                    }
+                    else
+                    {
+                    for (resMgrIdx = 0U; resMgrIdx < rmObj->gblCfgParams.numDmaChannels; ++resMgrIdx)
+                        {
+                        if (rmObj->gblCfgParams.dmaChannelPaRAMMap[resMgrIdx] != EDMA3_RM_CH_NO_PARAM_MAP)
+                        {
+                        rmInstance->initParam.rmInstInitConfig->resvdPaRAMSets[resMgrIdx/32U] |= (1u<<(resMgrIdx%32U));
+                        }
+                        }
+                    }
 
                     /*
                     * If the EDMA RM instance is MASTER (ie. initParam->isMaster