rman: getInternalState replace myAlloc with malloc Patch to fix issue raised in: https://e2e.ti.com/support/embedded/tirtos/f/355/p/514906/1869922 There is a call to malloc in getInternalState(). Replacing this call to malloc with the memory allocator function myAlloc. The corresponding free was replaced with myFree.
Make _regInit static in _DSKT2_init This variable is meant to be static so that init is only run one time. If it is not defined as static, then when asserts are enabled, the second call to _DSKT2_init will assert. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
edmamgr: add APIs to free and restore all edma hardware resources * This is needed to allow edmamgr allocated channels to survive from IpcPower suspend/resume: 1. Call EdmaMgr_hwFreeAll() before the suspend 2. Call EdmaMgr_hwAllocAll() after the resume Signed-off-by: Hongmei Gou <h-gou@ti.com>
Fix Issue with FC_suspend Resource Array Size The size of the array passed to RMAN_getResman was fixed to 10. So, if the algorithm was using more than 10 resources, stack corruption would result. Since there is no limit on the max number of resources that an algorithm may have, the array size should not be fixed. This patch fixes the issue by making the size of the array to match the actual number of resources used by the algorithm. Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
SDOCM00113029: Fix issue with limited size of EdmaMgr's internal heap. While the memory requirements for regular EdmaMgr channels are constrained relative to HW resources, large channels may require arbitrarily large memory for the lookup tables used in the chained transfers. Therefore this memory must come from outside EdmaMgr. The function EdmaMgr_getSizesLarge is introduced to provide the application with the buffer requirements for a large channel based on a supplied configuration. Signed-off-by: Jacob Stiffler <j-stiffler@ti.com>
SDOCM00113018: Fix issue with using "large" channels to perform regular non-linked transfers. 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>
edma3: reduce some strict binding to EDMA3 LLD When updating to a recent EDMA3 LLD release, some of the #defines have changed their 'unsigned number' definition usage from little-u to big-U (e.g. "#define foo (1u)" was changed to "define foo (1U)"). This causes build issues in FC since FC redefines some of these definitions (exactly how previous EDMA3 LLD releases did, using little-u). When the #defines were identical (FC used little-u, EDMA3 LLD used little-u), there was no issue. They were redundant definitions, but they were identical. But with the EDMA3 LLD change, the following warning (or error, depending on your compile flags) is reported (for several definitions): warning #48-D: incompatible redefinition of macro "EDMA3_MAX_DMA_CH" With this commit, only define the preprocessor definitions if they haven't already been defined. EDMA3 LLD-based users should #include the EDMA3 LLD headers first, then ti/sdo/fc/edma3/edma3_config.h, which will now detect that EDMA3 LLD has already made these definitions and will no longer redundantly define them. The reality is that the EDMA3 LLD is present in all current FC-supported environments. Historically FC supported Linux ARM which EDMA3 LLD didn't, but FC dropped Linux support a while ago. So a potentially better solution would be to _always_ depend on EDMA3 LLD. Signed-off-by: Chris Ring <cring@ti.com>
EdmaMgr : Fix logic in Large xfer APIs to detect when chaining is necessary. * Previous logic attempted to simplify detection using bit-wise logic on the pitch size, but was incorrect due wrong assumptions on the size of integers. * New log explicitly check whether or not the pitch size is on the interval [-32768,32767].
EdmaMgr : Added support for transfers with large pitch. Because of HW limitations, transfers with a pitch exceeding 16-bit representation cannot be accomplished in a single TCC. However, this may be accomplished through chaining. This patch adds "Large" APIs to allocate the necessary resources and perform 1D2D and 2D1D transfers when the pitch exceeds the HW limitation.
SDOCM00105754: EDMAMgr: Fix Local to Global addr Local to Global address conversion is missing for copyFast & linked_copyFast APIs. Converting src and dst addresses with "EDMA_MGR_ADDR_LOC_TO_GLOB()" in EdmaMgr_copyFast() and EdmaMgr_copyLinkedFast() APIs.