summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4b53ebb)
raw | patch | inline | side by side (parent: 4b53ebb)
author | Sinthu Raja M <x0257345@ti.com> | |
Thu, 19 Jul 2018 12:02:10 +0000 (17:32 +0530) | ||
committer | Sinthu Raja M <x0257345@ti.com> | |
Thu, 19 Jul 2018 12:24:49 +0000 (17:54 +0530) |
Fix CPP build issue due to incompatible assignment of variable
Add support for CPP build with PRAGMA usage update
Add support for CPP build with PRAGMA usage update
src/mcbsp_drv.c | patch | blob | history | |
src/mcbsp_edma.c | patch | blob | history |
diff --git a/src/mcbsp_drv.c b/src/mcbsp_drv.c
index 2f06774f92d8378b2c89cc3866f2258327669a47..b9de43e92525c06f179c5eb580e1fdcc1f387623 100644 (file)
--- a/src/mcbsp_drv.c
+++ b/src/mcbsp_drv.c
* peripheral like device initialization, channel creation, control commands for
* peripheral specific operations etc. It uses EDMA3 for data transfer.
*
- * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C) 2012 - 2018 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
/**
* \brief Array of Mcbsp instance State objects array
*/
+#ifdef __cplusplus
+#pragma DATA_SECTION (".mcbsp")
+#pragma DATA_ALIGN (MCBSP_MAX_CACHE_ALIGN)
+#else
#pragma DATA_SECTION (Mcbsp_Instances, ".mcbsp");
#pragma DATA_ALIGN (Mcbsp_Instances, MCBSP_MAX_CACHE_ALIGN)
+#endif
+
Mcbsp_Object Mcbsp_Instances[CSL_MCBSP_PER_CNT];
/**
/* Shared Memory Variable to ensure synchronizing SRIO initialization
* with all the other cores. */
/* Created an array to pad the cache line with MCBSP_MAX_CACHE_ALIGN size */
+#ifdef __cplusplus
+#pragma DATA_SECTION (".mcbsp")
+#pragma DATA_ALIGN (MCBSP_MAX_CACHE_ALIGN)
+#else
#pragma DATA_SECTION (Mcbsp_deviceInstInfo, ".mcbsp");
#pragma DATA_ALIGN (Mcbsp_deviceInstInfo, MCBSP_MAX_CACHE_ALIGN)
+#endif
Mcbsp_HwInfo Mcbsp_deviceInstInfo[CSL_MCBSP_PER_CNT];
/**
*
* \note Buffer used when the mcbsp is placed in mute.
*/
+#ifdef __cplusplus
+#pragma DATA_SECTION (".mcbsp")
+#pragma DATA_ALIGN (MCBSP_MAX_CACHE_ALIGN)
+#else
#pragma DATA_SECTION (Mcbsp_muteBuf, ".mcbsp");
#pragma DATA_ALIGN (Mcbsp_muteBuf, MCBSP_MAX_CACHE_ALIGN)
+#endif
Mcbsp_TempBuffer Mcbsp_muteBuf[CSL_MCBSP_PER_CNT];
#ifdef MCBSP_LOOPJOB_ENABLE
*
* \note Buffer used during the loop job mode for the Transmit section
*/
+#ifdef __cplusplus
+#pragma DATA_SECTION (".mcbsp")
+#pragma DATA_ALIGN (MCBSP_MAX_CACHE_ALIGN)
+#else
#pragma DATA_SECTION (Mcbsp_loopDstBuf, ".mcbsp");
#pragma DATA_ALIGN (Mcbsp_loopDstBuf, MCBSP_MAX_CACHE_ALIGN)
+#endif
Mcbsp_TempBuffer Mcbsp_loopDstBuf[CSL_MCBSP_PER_CNT];
/**
*
* \note Buffer used during the loop job mode for the Receive section
*/
+#ifdef __cplusplus
+#pragma DATA_SECTION (".mcbsp")
+#pragma DATA_ALIGN (MCBSP_MAX_CACHE_ALIGN)
+#else
#pragma DATA_SECTION (Mcbsp_loopSrcBuf, ".mcbsp");
#pragma DATA_ALIGN (Mcbsp_loopSrcBuf, MCBSP_MAX_CACHE_ALIGN)
+#endif
Mcbsp_TempBuffer Mcbsp_loopSrcBuf[CSL_MCBSP_PER_CNT];
#endif /* MCBSP_LOOPJOB_ENABLE */
* queue */
chanHandle->submitCount++;
- Mcbsp_osalQueuePut(chanHandle->ptrQPendList,(void*)ioBuf);
+ Mcbsp_osalQueuePut(chanHandle->ptrQPendList, (Mcbsp_QueueElem *)ioBuf);
/* critical section ends */
Mcbsp_osalExitSingleCoreCriticalSection(criticalSectionInfo);
/* increment the submit count */
chanHandle->submitCount++;
- Mcbsp_osalQueuePut(chanHandle->ptrQFloatList, (void*)ioBuf);
+ Mcbsp_osalQueuePut(chanHandle->ptrQFloatList, (Mcbsp_QueueElem *)ioBuf);
Mcbsp_localLoadPktToEdma(chanHandle,ioBuf);
* param table and return the actual transfer element count */
while (TRUE != Mcbsp_osalQueueEmpty(chanHandle->ptrQFloatList))
{
- ioBuf = Mcbsp_osalQueueGet(chanHandle->ptrQFloatList);
+ ioBuf = (Mcbsp_IOBuf *) Mcbsp_osalQueueGet(chanHandle->ptrQFloatList);
if (NULL != ioBuf)
{
/* Empty the pending queue */
while (TRUE != Mcbsp_osalQueueEmpty(chanHandle->ptrQPendList))
{
- ioBuf = Mcbsp_osalQueueGet(chanHandle->ptrQPendList);
+ ioBuf = (Mcbsp_IOBuf *) Mcbsp_osalQueueGet(chanHandle->ptrQPendList);
if (NULL != ioBuf)
{
chanHandle->xferChan);
/* complete the IOP now and call the callback to the stream */
- chanHandle->tempIOBuf = Mcbsp_osalQueueGet(chanHandle->ptrQFloatList);
+ chanHandle->tempIOBuf = (Mcbsp_IOBuf *) Mcbsp_osalQueueGet(chanHandle->ptrQFloatList);
/* Decrement the submit count for the IO buffers */
chanHandle->submitCount--;
diff --git a/src/mcbsp_edma.c b/src/mcbsp_edma.c
index 9241b811437704110a5715b0f95bfd099d09809e..64fc8ad7c08e13d285462a13fd32357f7830484f 100644 (file)
--- a/src/mcbsp_edma.c
+++ b/src/mcbsp_edma.c
* tation for EDMA operation specifc calls like starting an EDMA transfer for
* for McBSP peripheral, EDMA completion and/or error callbacks etc.
*
- * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/
+ * Copyright (C) 2012 - 2018 Texas Instruments Incorporated - http://www.ti.com/
*
*
* Redistribution and use in source and binary forms, with or without
@@ -1134,7 +1134,7 @@ void Mcbsp_localEdmaCallback(uint32_t tcc, EDMA3_RM_TccStatus edmaStatus, void*
}
/* Get the buffer from the top of the queue (atomic operation) */
- chanHandle->tempIOBuf = Mcbsp_osalQueueGet(chanHandle->ptrQFloatList);
+ chanHandle->tempIOBuf = (Mcbsp_IOBuf *) Mcbsp_osalQueueGet(chanHandle->ptrQFloatList);
instHandle = (Mcbsp_Object_Unpadded *)&(chanHandle->devHandle->obj);
/* check if the queue has any request to be processed */
if (FALSE == Mcbsp_osalQueueEmpty(chanHandle->ptrQPendList))
{
- chanHandle->dataIOBuf = Mcbsp_osalQueueGet(chanHandle->ptrQPendList);
+ chanHandle->dataIOBuf = (Mcbsp_IOBuf *) Mcbsp_osalQueueGet(chanHandle->ptrQPendList);
if (NULL != chanHandle->dataIOBuf)
{
/* Additional to assigning the important parameters as above *
* for DMA mode , we will have max 2 buffers floating and hence *
* we use a activequue to manage this */
- Mcbsp_osalQueuePut(chanHandle->ptrQFloatList, (void*)chanHandle->dataIOBuf);
+ Mcbsp_osalQueuePut(chanHandle->ptrQFloatList, (Mcbsp_QueueElem *)chanHandle->dataIOBuf);
/* Set the status as valid */
status = Mcbsp_STATUS_VALID;