summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: cef5e1e)
raw | patch | inline | side by side (from parent 1: cef5e1e)
author | John Godbey <j-godbey@ti.com> | |
Mon, 23 Nov 2015 21:48:07 +0000 (16:48 -0500) | ||
committer | Angela Stegmaier <angelabaker@ti.com> | |
Tue, 24 Nov 2015 16:15:27 +0000 (10:15 -0600) |
Changed the formatting of the #ifdef definitions to
#if defined(xdc_target__isaCompatible_xxxx)
to better follow the existing code.
Signed-off-by: John Godbey <j-godbey@ti.com>
#if defined(xdc_target__isaCompatible_xxxx)
to better follow the existing code.
Signed-off-by: John Godbey <j-godbey@ti.com>
packages/ti/sdo/ipc/family/tci663x/Interrupt.c | patch | blob | history | |
packages/ti/sdo/ipc/family/tci663x/MultiProcSetup.c | patch | blob | history |
diff --git a/packages/ti/sdo/ipc/family/tci663x/Interrupt.c b/packages/ti/sdo/ipc/family/tci663x/Interrupt.c
index ad6c61ebf026c27ee80e6a0d6b096989e64baec8..20d9f955270030fd62fd7cc0985bb9bb05e291d1 100644 (file)
#define ARM_SOURCE_OFFSET 31
#define ARM_HWI_OFFSET 32
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
extern cregister volatile UInt DNUM;
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
/* ARM does not support DNUM */
#endif
Interrupt_A_hostConfig);
}
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
/* Validate the running executable has been loaded onto the correct
* processor. In other words, make sure CORE0 was loaded onto DSP0
* (i.e. DNUM == 0), CORE1 loaded onto DSP1, etc.
if (nameId != DNUM) {
System_abort("incorrect executable loaded onto processor");
}
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
/* Host doesn't necessarily follow the same naming conventions
*/
#endif
return (Startup_DONE);
}
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
/* only write KICK registers from CORE0 */
if (DNUM == 0) {
/* TODO: What if CORE0 is not started, but the others are? */
*kick1 = 0x95a4f1e0; /* must be written with this value */
}
}
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
/* reserved for RTOS HOST
*/
#endif
UInt key;
Hwi_Params hwiAttrs;
UInt16 clusterId;
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
volatile UInt32 *ipcar = (volatile UInt32 *)Interrupt_IPCAR0;
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
volatile UInt32 *ipcarh = (volatile UInt32 *)Interrupt_IPCARH;
#endif
UInt32 val;
/* make sure the interrupt gets plugged only once */
if (Interrupt_module->numPlugged++ == 0) {
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
/* clear all pending ipc interrupts */
val = ipcar[DNUM];
ipcar[DNUM] = val;
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
/* Verify that this works for ARM */
val = *ipcarh;
*ipcarh = val;
/* register ipc interrupt */
Hwi_Params_init(&hwiAttrs);
hwiAttrs.maskSetting = Hwi_MaskingOption_SELF;
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
hwiAttrs.eventId = Interrupt_INTERDSPINT,
Interrupt_module->hwi = Hwi_create(Interrupt_ipcIntr, Interrupt_isr,
&hwiAttrs, NULL);
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
Interrupt_module->hwi =
Hwi_create(Interrupt_INTERDSPINT + ARM_HWI_OFFSET,
Interrupt_isr, &hwiAttrs, NULL);
int clusterId;
UInt dnum;
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
/* bit 0 is set to generate interrupt.
* bits 4-7 is set to specify the interrupt generation source.
* The convention is that bit 4 (SRCS0) is used for core 0,
* bit 5 (SRCS1) for core 1, etc... .
*/
val = (1 << (DNUM + Interrupt_SRCSx_SHIFT)) | 1;
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
/* Host sets the first bit instead of using DNUM
*/
val = (1 << ARM_SOURCE_OFFSET) | 1;
int clusterId;
int bit;
UInt32 val;
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
volatile UInt32 *ipcgr = (volatile UInt32 *)Interrupt_IPCGR0;
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
volatile UInt32 *ipcgrh = (volatile UInt32 *)Interrupt_IPCGRH;
#endif
@@ -296,10 +296,10 @@ Void Interrupt_intPost(UInt16 srcProcId, IInterrupt_IntInfo *intInfo, UArg arg)
bit = Interrupt_module->hwTab[clusterId].srcsx;
val = (1 << bit) | 1;
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
/* raise the interrupt to myself */
ipcgr[DNUM] = val;
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
*ipcgrh = val;
#endif
}
{
int clusterId;
int pos;
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
volatile UInt32 *ipcar = (volatile UInt32 *)Interrupt_IPCAR0;
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
volatile UInt32 *ipcarh = (volatile UInt32 *)Interrupt_IPCARH;
#endif
UInt val;
clusterId = remoteProcId - Interrupt_module->baseId;
pos = Interrupt_module->hwTab[clusterId].srcsx;
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
/* read ipcar register to get source bits */
val = ipcar[DNUM];
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
val = *ipcarh;
#endif
if (val & (1 << pos)) {
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
/* write ipc acknowledgement register to clear source bit */
ipcar[DNUM] = (1 << pos);
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
*ipcarh = (1 << pos);
#endif
stat = 1;
{
int clId;
Interrupt_ClientEntry *entry;
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
volatile UInt32 *ipcar = (volatile UInt32 *)Interrupt_IPCAR0;
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
volatile UInt32 *ipcarh = (volatile UInt32 *)Interrupt_IPCARH;
#endif
UInt32 val;
int bit;
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
/* ipc acknowledgement register value */
val = ipcar[DNUM];
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
val = *ipcarh;
#endif
if (val & (1 << bit)) {
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
/* clear the interrupt source */
ipcar[DNUM] = (1 << bit);
-#else
+#elif defined(xdc_target__isaCompatible_v7A)
*ipcarh = (1 << bit);
#endif
diff --git a/packages/ti/sdo/ipc/family/tci663x/MultiProcSetup.c b/packages/ti/sdo/ipc/family/tci663x/MultiProcSetup.c
index 5f93a55ee3dff2d87c1cfe480432ad4f21f6017a..2a3d3d8e3920a9909e7c19e070e4a84231e09ffa 100644 (file)
#include "package/internal/MultiProcSetup.xdc.h"
-
-#ifdef _TMS320C6X
+#if defined(xdc_target__isaCompatible_64P)
/*!
* ======== MultiProcSetup_init ========
*/
return (MultiProc_INVALIDID);
}
-
#else
/* TODO: MultiProcSetup does not support ARM
* This file may be deprecated.