Merge branch 'releases/mcsdk_03.01.00.00'
authorPragat Chaudhari <pragatc@ti.com>
Sun, 8 Jun 2014 18:56:41 +0000 (14:56 -0400)
committerPragat Chaudhari <pragatc@ti.com>
Sun, 8 Jun 2014 18:56:41 +0000 (14:56 -0400)
31 files changed:
docs/ReleaseNotes_TCP3DDriver.doc
docs/ReleaseNotes_TCP3DDriver.pdf
docs/TCP3D_DriverSDS.doc [new file with mode: 0644]
docs/TCP3D_DriverSDS.pdf
docs/TCP3D_Driver_Demo.ppt [new file with mode: 0644]
docs/TCP3D_Driver_Demo.vsd [new file with mode: 0644]
docs/TCP3D_Driver_Design.ppt [new file with mode: 0644]
docs/TCP3D_Driver_Design.vsd [new file with mode: 0644]
example/k2l/c66/bios/link.cmd [new file with mode: 0644]
example/k2l/c66/bios/sample_config.cfg [new file with mode: 0644]
example/k2l/c66/bios/tcp3dK2LC66BiosExampleProject.txt [new file with mode: 0644]
example/k2l/c66/bios/tcp3d_osal.c [new file with mode: 0644]
example/src/tcp3d_example_main.c
example/src/tcp3d_main.h
example/src/tcp3d_multi_inst.h
example/src/tcp3d_single_inst.h
package.xdc
projectCreate.bat
setupenv.bat
src/tcp3d_drv.c
src/tcp3d_drv_priv.h
tcp3d_drv.h
tcp3dver.h.xdt
test/k2l/c66/bios/link_test.cmd [new file with mode: 0644]
test/k2l/c66/bios/tcp3dK2LC66BiosTestProject.txt [new file with mode: 0644]
test/k2l/c66/bios/tcp3d_drv_test.cfg [new file with mode: 0644]
test/k2l/c66/bios/tcp3d_osal.h [new file with mode: 0644]
test/src/tcp3d_main.c
test/src/tcp3d_main.h
test/src/tcp3d_multi_inst.h
test/src/tcp3d_single_inst.h

index 9bc1b3bc5975f4e45ef90712f60c000350eedc06..10cb0eaeb0ab8d6d3d87900fefcaf5c5e33e4be1 100644 (file)
Binary files a/docs/ReleaseNotes_TCP3DDriver.doc and b/docs/ReleaseNotes_TCP3DDriver.doc differ
index 49129c56fd79c9a4de5767fad4c2ef050ea4d04c..165462b3f2b0231b0f555f03378ba3342d2a37c3 100644 (file)
Binary files a/docs/ReleaseNotes_TCP3DDriver.pdf and b/docs/ReleaseNotes_TCP3DDriver.pdf differ
diff --git a/docs/TCP3D_DriverSDS.doc b/docs/TCP3D_DriverSDS.doc
new file mode 100644 (file)
index 0000000..5a386eb
Binary files /dev/null and b/docs/TCP3D_DriverSDS.doc differ
index 8acb0058fa5065e4c10d05c78aeeb6525d697985..58f3fa40d37509fc2e0f9f6c4dd8f60543f0affc 100644 (file)
Binary files a/docs/TCP3D_DriverSDS.pdf and b/docs/TCP3D_DriverSDS.pdf differ
diff --git a/docs/TCP3D_Driver_Demo.ppt b/docs/TCP3D_Driver_Demo.ppt
new file mode 100644 (file)
index 0000000..b4693aa
Binary files /dev/null and b/docs/TCP3D_Driver_Demo.ppt differ
diff --git a/docs/TCP3D_Driver_Demo.vsd b/docs/TCP3D_Driver_Demo.vsd
new file mode 100644 (file)
index 0000000..ce02d53
Binary files /dev/null and b/docs/TCP3D_Driver_Demo.vsd differ
diff --git a/docs/TCP3D_Driver_Design.ppt b/docs/TCP3D_Driver_Design.ppt
new file mode 100644 (file)
index 0000000..a0f58e9
Binary files /dev/null and b/docs/TCP3D_Driver_Design.ppt differ
diff --git a/docs/TCP3D_Driver_Design.vsd b/docs/TCP3D_Driver_Design.vsd
new file mode 100644 (file)
index 0000000..e1427f1
Binary files /dev/null and b/docs/TCP3D_Driver_Design.vsd differ
diff --git a/example/k2l/c66/bios/link.cmd b/example/k2l/c66/bios/link.cmd
new file mode 100644 (file)
index 0000000..b577539
--- /dev/null
@@ -0,0 +1,7 @@
+SECTIONS
+{
+       .init_array: load >> L2SRAM
+       .csl_vect               > L2SRAM
+       .main_mem               > L2SRAM
+       .profile_mem    > L2SRAM
+}
diff --git a/example/k2l/c66/bios/sample_config.cfg b/example/k2l/c66/bios/sample_config.cfg
new file mode 100644 (file)
index 0000000..1e13599
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * ======== sample_config.cfg ========
+ */
+
+/* IPC packages */
+var ListMP = xdc.useModule('ti.sdo.ipc.ListMP');
+var GateMP = xdc.useModule('ti.sdo.ipc.GateMP');
+var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
+var HeapMemMP = xdc.useModule('ti.sdo.ipc.heaps.HeapMemMP');
+var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
+var Ipc         = xdc.useModule('ti.sdo.ipc.Ipc');
+
+/* Configure System to use SysMin */
+System = xdc.useModule('xdc.runtime.System');
+SysStd  = xdc.useModule('xdc.runtime.SysStd');
+System.SupportProxy = xdc.useModule('xdc.runtime.SysMin')
+System.SupportProxy = SysStd;
+System.extendedFormats = "%$S%f";
+
+/* Set the system stack - 0x2000 */
+Program.stack = 0x4000;
+
+var Memory = xdc.useModule('xdc.runtime.Memory');
+var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
+
+/* Use HeapMem for default heap manager and give it 49152 (0xC000)
+ * bytes to work with.
+ */
+Program.sectMap["systemHeap"] = Program.platform.dataMemory;
+var heapMemParams = new HeapMem.Params;
+heapMemParams.size = 0x18000;
+heapMemParams.sectionName = "systemHeap";
+Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
+
+/*
+ * Creating Heap Memories for using with test application
+ */
+/* Create a heap for TCP3D input/output data using ti.bios.HeapMem. */
+/* Program.sectMap["tcp3DataSection"] = {loadSegment: "MSMCSRAM"};
+var heapMemParams1 = new HeapMem.Params;
+heapMemParams1.size = 0x100000;
+heapMemParams1.align = 64;
+heapMemParams1.sectionName = "tcp3DataSection";
+Program.global.tcp3dDataHeap = HeapMem.create(heapMemParams1); */
+
+/* Create a heap for TCP3D driver using ti.bios.HeapMem. */
+Program.sectMap["tcp3DriverSection"] = Program.platform.dataMemory;
+var heapMemParams2 = new HeapMem.Params;
+heapMemParams2.size = 0x4000;
+heapMemParams2.sectionName = "tcp3DriverSection";
+Program.global.tcp3dDrvHeap = HeapMem.create(heapMemParams2);
+
+/* Create a heap for TCP3D QUEUE DESCRIPTORS using ti.bios.HeapMem. */
+Program.sectMap["tcp3QueueDescrSection"] = Program.platform.dataMemory;
+var heapMemParams3 = new HeapMem.Params;
+heapMemParams3.size = 4096;
+heapMemParams3.sectionName = "tcp3QueueDescrSection";
+Program.global.tcp3dQueHeap = HeapMem.create(heapMemParams3);
+
+/* To avoid wasting shared memory for Notify and MessageQ transports */
+for (var i = 0; i < MultiProc.numProcessors; i++) {
+    Ipc.setEntryMeta({
+        remoteProcId: i,
+        setupNotify: false,
+        setupMessageQ: false,
+    });
+}
+
+
+SharedRegion.setEntryMeta(0,
+    { base: 0x0C000000,
+      len: 0x100000,
+      ownerProcId: 0,
+      cacheLineSize: 64,
+      isValid: true,
+      name: "sharemem",
+    });
+
+/* 
+ * Pull in Timer, Semaphore, Swi, Task, and Queue modules
+ * used in this example.
+ */
+var BIOS = xdc.useModule('ti.sysbios.BIOS');
+xdc.useModule('ti.sysbios.hal.Timer');
+xdc.useModule('ti.sysbios.knl.Semaphore');
+xdc.useModule('ti.sysbios.knl.Swi');
+xdc.useModule('ti.sysbios.knl.Task');
+xdc.useModule('ti.sysbios.hal.Cache');
+xdc.useModule('ti.sysbios.family.c64p.Hwi');
+xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
+xdc.useModule('xdc.runtime.Log');
+xdc.useModule('xdc.runtime.Error');
+var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
+var ECM = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
+
+/*
+ * Enable Event Groups here and registering of ISR for specific GEM INTC is done
+ * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
+ */
+ECM.eventGroupHwiNum[0] = 7;
+ECM.eventGroupHwiNum[1] = 8;
+ECM.eventGroupHwiNum[2] = 9;
+ECM.eventGroupHwiNum[3] = 10;
+
+/*
+ * Setup the Logger for Driver
+ */
+var LoggerSys0Params0 = new LoggerSys.Params;
+LoggerSys0Params0.instance.name = 'tcp3dDrvLog';
+Program.global.tcp3dDrvLog = LoggerSys.create(LoggerSys0Params0);
+
+/*
+ * allow printf() to be called from Swi threads. Note that use of this gate
+ * incurs additional latency for Swi processing since Swi scheduler will be
+ * disabled to manage critical sections within the RTS library code.
+BIOS.rtsGateType = BIOS.GateSwi;
+ */
+
+
+/*
+ * Adding the other Dependent packages
+ */
+/*xdc.loadPackage('ti.wbi.common.api');*/
+xdc.loadPackage('ti.sdo.edma3.drv');
+
+/* Load the TCP3D package */
+var Tcp3d = xdc.useModule('ti.drv.tcp3d.Settings');
+
+/* Load the CSL package */
+var Csl = xdc.useModule('ti.csl.Settings');
+
+/* Device specific configuration */
+var devName = "k2l";
+Csl.deviceType      = devName;
diff --git a/example/k2l/c66/bios/tcp3dK2LC66BiosExampleProject.txt b/example/k2l/c66/bios/tcp3dK2LC66BiosExampleProject.txt
new file mode 100644 (file)
index 0000000..29693a1
--- /dev/null
@@ -0,0 +1,16 @@
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/tcp3d_drv_sample_init.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/tcp3d_example_main.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/sample_cfg.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/sample_cs.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/sample_init.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/sample_int_reg.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/CpIntc_local.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/tcp3d_codeBlkSeg.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/tcp3d_inputConfigPrep.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/tcp3d_itg.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/src/tcp3d_testset_functions.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/k2k/c66/bios/tcp3d_osal.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/k2k/c66/bios/link.cmd"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/example/k2k/c66/bios/sample_config.cfg"
+-ccs.setCompilerOptions "-mv6600 -g -DDEVICE_K2L -DUSE_TCP3D_DRIVER_TYPES --diag_warning=225 -I${TCP3D_INSTALL_PATH} -I${TCP3D_INSTALL_PATH}/ti/drv/tcp3d/example/src"
+-rtsc.enableRtsc
diff --git a/example/k2l/c66/bios/tcp3d_osal.c b/example/k2l/c66/bios/tcp3d_osal.c
new file mode 100644 (file)
index 0000000..6ec5345
--- /dev/null
@@ -0,0 +1,82 @@
+/**
+ *   @file  sample_osal.c
+ *
+ *   @brief   
+ *      This is the OS abstraction layer and is used by the CPPI and QMSS
+ *      low level drivers for the CPPI sample example.
+ *
+ *  \par
+ *  ============================================================================
+ *  @n   (C) Copyright 2009, Texas Instruments, Inc.
+ * 
+ *  Redistribution and use in source and binary forms, with or without 
+ *  modification, are permitted provided that the following conditions 
+ *  are met:
+ *
+ *    Redistributions of source code must retain the above copyright 
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ *    Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the 
+ *    documentation and/or other materials provided with the   
+ *    distribution.
+ *
+ *    Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+*/
+/* XDC includes */ 
+#include <xdc/std.h>
+#include <xdc/cfg/global.h>
+
+/**
+ *  @b Description
+ *  @n  
+ *      The function is the TCP3D OSAL Logging API which logs 
+ *      the messages on the console.
+ *
+ *  @param[in]  fmt
+ *      Formatted String.
+ *
+ *  @retval
+ *      Not Applicable
+ */
+void Osal_tcp3dLog ( char *fmt, ... )
+{
+}
+
+/**
+ *  @b Description
+ *  @n  
+ *      The function is the TCP3D OSAL memory copy API which is directly 
+ *      mapped to memcpy funciton.
+ *
+ *  @param[in]  _s1
+ *      destination address
+ *
+ *  @param[in]  _s2
+ *      source address
+ *
+ *  @param[in]  _n
+ *      number of bytes
+ *
+ *  @retval
+ *      destination address
+ */
+void* Osal_memcpy(void *_s1, const void *_s2, size_t _n)
+{
+    return memcpy(_s1, _s2, _n);
+}
index b0db9da6eb903d4ee3100e218304611a0e4cd189..c2be5448b0fc9ba22a8002d69297bdc07b160232 100644 (file)
@@ -67,6 +67,7 @@
 #include <ti/csl/csl_tsc.h>\r
 #include <ti/csl/csl_cacheAux.h>\r
 #include <ti/csl/csl_xmcAux.h>\r
+#include <ti/csl/csl_pscAux.h>\r
 \r
 #include "sample.h"\r
 #include "tcp3d_drv_sample.h"\r
  **********************************************************************/\r
 #define START_CMD_PERIOD            1\r
 \r
-#define SIMULATOR_SUPPORT           0\r
-\r
 /**********************************************************************\r
  ************************** Test Variables ****************************\r
  **********************************************************************/\r
@@ -127,7 +126,7 @@ cbTestDesc              codeBlockSet;
 \r
 Char                    *strMode[4] = {"3GPP(0)","LTE(1)","WIMAX(2)","WCDMA Split(3)"};\r
 Char                    *strDBuf[2] = {"Disable(0)","Enable(1)"};\r
-Char                    *strInst[2] = {"TCP3D_A(0)","TCP3D_B(1)"};\r
+Char                    *strInst[2] = {"TCP3D_0(0)","TCP3D_1(1)"};\r
 \r
 UInt32                  keepTestVectMem = 0;\r
 UInt32                  firstTime = 1;\r
@@ -361,14 +360,7 @@ Void testerTaskFunc(Void)
     dspCoreID           = CSL_chipReadDNUM();\r
 \r
     /******** Select the TCP3D Instance Number **********/\r
-#if 0\r
-    if ( dspCoreID == 0 ) // Core 0\r
-        instNum = CSL_TCP3D_A;\r
-    else\r
-        instNum = CSL_TCP3D_B;\r
-#else\r
     instNum = getTcp3dInstNum(dspCoreID);\r
-#endif\r
 \r
     /* Initialize the default Task parameters */\r
     Task_Params_init(&taskParams);\r
@@ -519,7 +511,7 @@ Void testerTaskFunc(Void)
         System_printf("Code blocks sent for decoding    : %d\n", codeBlockSet.maxNumCB);\r
         System_printf("Call back counters               : %d - interrupts\n", pauseIntr);\r
         System_printf("                          (%d-SOLDOUT, %d-PAUSE, %d-PENDPAUSE)\n", afterIntrSoldout, afterIntrPause, pendPauseCntr);\r
-        System_printf("Total Notificaiton Interrupts    : %d\n", tcp3dEventCntr);\r
+        System_printf("Total Notification Interrupts    : %d\n", tcp3dEventCntr);\r
         System_printf("Throughput Calculations\n");\r
         System_printf("    Total Bits Decoded           : %d\n", TotalBitsDecoded);\r
         System_printf("    Time Taken (in cycles)       : %d\n", test_cycles);\r
@@ -1026,7 +1018,7 @@ Void getMemoryStats(Void)
     Memory_Stats        memStats;\r
 \r
     Memory_getStats(drvHeap, &memStats);\r
-    System_printf("\nHeap Usage/Staus\n");\r
+    System_printf("\nHeap Usage/Status\n");\r
     System_printf("    tcp3dDrvHeap : %d of %d free\n", memStats.totalFreeSize, memStats.totalSize);\r
 \r
     Memory_getStats(dataHeap, &memStats);\r
@@ -1250,27 +1242,27 @@ static Int32 enable_tcp3d (void)
      * This is not required for the simulator. */\r
 \r
     /* Set TCP3D Power domain to ON */        \r
-    CSL_PSC_enablePowerDomain (CSL_PSC_PD_TCP3D);\r
+    CSL_PSC_enablePowerDomain (TEST_CSL_PSC_PD_TCP3D);\r
 \r
     /* Enable the clocks too for TCP3D */\r
-    CSL_PSC_setModuleNextState (CSL_PSC_LPSC_TCP3D, PSC_MODSTATE_ENABLE);\r
+    CSL_PSC_setModuleNextState (TEST_CSL_PSC_LPSC_TCP3D, PSC_MODSTATE_ENABLE);\r
 \r
     /* Start the state transition */\r
-    CSL_PSC_startStateTransition (CSL_PSC_PD_TCP3D);\r
+    CSL_PSC_startStateTransition (TEST_CSL_PSC_PD_TCP3D);\r
 \r
     /* Wait until the state transition process is completed. */\r
-    while (!CSL_PSC_isStateTransitionDone (CSL_PSC_PD_TCP3D));\r
+    while (!CSL_PSC_isStateTransitionDone (TEST_CSL_PSC_PD_TCP3D));\r
 \r
     /* Return TCP3D PSC status */\r
-    if ((CSL_PSC_getPowerDomainState(CSL_PSC_PD_TCP3D) == PSC_PDSTATE_ON) &&\r
-        (CSL_PSC_getModuleState (CSL_PSC_LPSC_TCP3D) == PSC_MODSTATE_ENABLE))\r
+    if ((CSL_PSC_getPowerDomainState(TEST_CSL_PSC_PD_TCP3D) == PSC_PDSTATE_ON) &&\r
+        (CSL_PSC_getModuleState (TEST_CSL_PSC_LPSC_TCP3D) == PSC_MODSTATE_ENABLE))\r
     {\r
         /* TCP3D ON. Ready for use */            \r
         return 0;\r
     }\r
     else\r
     {\r
-        /* SRIO Power on failed. Return error */            \r
+        /* TCP3D Power on failed. Return error */            \r
         return -1;            \r
     }\r
 #else\r
index 32d7b09edf1518ba61322fec79ee3bd1bcb1254c..92bf07d158aa0cd6610a61982ded91a1a55c1ecd 100644 (file)
 #define TEST_INTR_ENABLE        1\r
 #define TEST_INTR_DISABLE       0\r
 \r
+/* Enable the correct power domain for the device. */\r
+#ifdef DEVICE_K2L\r
+#define TEST_CSL_PSC_PD_TCP3D       CSL_PSC_PD_TCP3D_0\r
+#define TEST_CSL_PSC_LPSC_TCP3D     CSL_PSC_LPSC_TCP3D_0\r
+#else /* DEVICE_K2K, DEVICE_K2H */\r
+#define TEST_CSL_PSC_PD_TCP3D       CSL_PSC_PD_TCP3D_01\r
+#define TEST_CSL_PSC_LPSC_TCP3D     CSL_PSC_LPSC_TCP3D_0\r
+#endif\r
+\r
 /**********************************************************************\r
  ************************** Test Structures ***************************\r
  **********************************************************************/\r
index 946697de46e932953334b6099fac3bbcf2ce9df6..feff0288444f1ea86f440740c86121791c9636fb 100644 (file)
 /**\r
  * Test TCP3D Notification Events\r
  */\r
-#define TCP3D_A_TEST_EVENT              7\r
-#define TCP3D_B_TEST_EVENT              23\r
+#define TCP3D_0_TEST_EVENT              7\r
+#define TCP3D_1_TEST_EVENT              23\r
 \r
 /**\r
  * This gives the channel numbers to which the TCP3 decoder REVTs are mapped.\r
- * ((per spec intc_1.3.4.12.xlsx, TPCC2)\r
+ * ((per Data sheet SPRS835C, SPRS893 and internal spec \r
+ * intc_1.3.4.12.xlsx,TPCC2)\r
  */\r
-#define TCP3D_A_REVT0_CH_NUMBER         34\r
-#define TCP3D_A_REVT1_CH_NUMBER         35\r
-#define TCP3D_B_REVT0_CH_NUMBER         36\r
-#define TCP3D_B_REVT1_CH_NUMBER         37\r
+#define TCP3D_0_REVT0_CH_NUMBER         34\r
+#define TCP3D_0_REVT1_CH_NUMBER         35\r
+#define TCP3D_1_REVT0_CH_NUMBER         36\r
+#define TCP3D_1_REVT1_CH_NUMBER         37\r
 \r
 INLINE UInt32 getHostIntrNum(UInt32 dspCoreID)\r
 {\r
@@ -64,9 +65,9 @@ INLINE UInt32 getNotifyEventNum(UInt8 instNum)
     UInt32 testEvt;\r
 \r
     if ( instNum == CSL_TCP3D_0 )\r
-        testEvt = TCP3D_A_TEST_EVENT; //  First instance\r
+        testEvt = TCP3D_0_TEST_EVENT; //  First instance\r
     else\r
-        testEvt = TCP3D_B_TEST_EVENT; //  Second instance\r
+        testEvt = TCP3D_1_TEST_EVENT; //  Second instance\r
 \r
     return testEvt;\r
 }\r
@@ -88,9 +89,9 @@ INLINE UInt32 getRevt0ChannelNum(UInt8 instNum)
     UInt32 chNum;\r
 \r
     if ( instNum == CSL_TCP3D_0 )\r
-        chNum = TCP3D_A_REVT0_CH_NUMBER; //  First instance\r
+        chNum = TCP3D_0_REVT0_CH_NUMBER; //  First instance\r
     else\r
-        chNum = TCP3D_B_REVT0_CH_NUMBER; //  Second instance\r
+        chNum = TCP3D_1_REVT0_CH_NUMBER; //  Second instance\r
 \r
     return chNum;\r
 }\r
@@ -100,9 +101,9 @@ INLINE UInt32 getRevt1ChannelNum(UInt8 instNum)
     UInt32 chNum;\r
 \r
     if ( instNum == CSL_TCP3D_0 )\r
-        chNum = TCP3D_A_REVT1_CH_NUMBER; //  First instance\r
+        chNum = TCP3D_0_REVT1_CH_NUMBER; //  First instance\r
     else\r
-        chNum = TCP3D_B_REVT1_CH_NUMBER; //  Second instance\r
+        chNum = TCP3D_1_REVT1_CH_NUMBER; //  Second instance\r
 \r
     return chNum;\r
 }\r
index 2d535196e26523d5061d75e90c5a9530c086b2d7..9e0563bbd7151b289247475cc38b3fcdb9f245a1 100644 (file)
 /**\r
  * Test TCP3D Notification Events\r
  */\r
-#define TCP3D_A_TEST_EVENT              23\r
+#define TCP3D_0_TEST_EVENT              7\r
 \r
 /**\r
  * This gives the channel numbers to which the TCP3 decoder REVTs are mapped.\r
- * (as per spec nysh_INTERNAL_1_0_7.pdf)\r
+ * ((per Data sheet SPRS835C, SPRS893 and internal spec \r
+ * intc_1.3.4.12.xlsx,TPCC2)\r
  */\r
-#define TCP3D_A_REVT0_CH_NUMBER         0\r
-#define TCP3D_A_REVT1_CH_NUMBER         1\r
+#define TCP3D_0_REVT0_CH_NUMBER         34\r
+#define TCP3D_0_REVT1_CH_NUMBER         35\r
 \r
 INLINE UInt32 getHostIntrNum(UInt32 dspCoreID)\r
 {\r
     /* Host Interrupts for CPINTC0 (per spec - 0.0.1) */\r
-    UInt32  hostIntr[] = {6u, 26u, 46u, 66u};\r
+    UInt32  hostIntr[] = {13u, 29u, 45u, 61u};\r
 \r
     return hostIntr[dspCoreID];\r
 }\r
 \r
 INLINE UInt32 getNotifyEventNum(UInt8 instNum)\r
 {\r
-    return TCP3D_A_TEST_EVENT;\r
+    return TCP3D_0_TEST_EVENT;\r
 }\r
 \r
 INLINE CSL_TPCC_ShadowRegs * getEdma3ShadowRegsBase(UInt32 regionNum)\r
@@ -75,27 +76,27 @@ INLINE UInt32 getCpIntc0RegsBase()
 \r
 INLINE UInt32 getRevt0ChannelNum(UInt8 instNum)\r
 {\r
-    return TCP3D_A_REVT0_CH_NUMBER;\r
+    return TCP3D_0_REVT0_CH_NUMBER;\r
 }\r
 \r
 INLINE UInt32 getRevt1ChannelNum(UInt8 instNum)\r
 {\r
-    return TCP3D_A_REVT1_CH_NUMBER;\r
+    return TCP3D_0_REVT1_CH_NUMBER;\r
 }\r
 \r
 INLINE UInt8 getTcp3dInstNum(UInt32 dspCoreID)\r
 {\r
-    return CSL_TCP3D_A;\r
+    return CSL_TCP3D_0;\r
 }\r
 \r
 INLINE UInt32 getTcp3dCfgRegsBase(UInt8 instNum)\r
 {\r
-    return CSL_TCP3D_A_CFG_REGS;\r
+    return CSL_TCP3D_0_CFG_REGS;\r
 }\r
 \r
 INLINE UInt32 getTcp3dDataRegsBase(UInt8 instNum)\r
 {\r
-    return CSL_TCP3D_A_DATA_REGS;\r
+    return CSL_TCP3D_0_DATA_REGS;\r
 }\r
 \r
 #endif  /* _TCP3D_SINGLE_INST_H_ */\r
index 01108d36f8b18797230c011d20a1caa7ff268aa6..5b7f308b04f62fffb7c74e8576d5269d3e614f88 100755 (executable)
@@ -9,7 +9,7 @@
  * Copyright (C) 2012, Texas Instruments, Inc.\r
  *****************************************************************************/\r
 \r
-package ti.drv.tcp3d[2, 00, 00, 03] {\r
+package ti.drv.tcp3d[2, 01, 00, 00] {\r
     module Settings;\r
 }\r
 \r
index f11af728426092cfda814bc05f0e11bd68ff1bf7..4f98601c593e2894eb6eefed7324041a61fb2adc 100755 (executable)
 @REM *  projectCreate.bat [deviceName] [endian]\r
 @REM *\r
 @REM * Description:     (first option is default)\r
-@REM *  deviceName  -   k2k / k2h\r
+@REM *  deviceName  -   k2k / k2h / k2l\r
 @REM *  endian      -   little / big\r
 @REM *\r
 @REM * Example:\r
 @REM *  a) projectCreate.bat\r
-@REM *              - Creates all module projects for k2k device for little endian\r
+@REM *              - Creates all module projects for k2h device for little endian\r
 @REM *  b) projectCreate.bat k2h\r
 @REM *              - Creates all module projects for k2h device for little endian\r
 @REM *  c) projectCreate.bat k2k big\r
@@ -29,7 +29,7 @@
 REM Parameter Validation: Check if the argument was passed to the batch file.\r
 REM *****************************************************************************\r
 REM Argument [deviceName] is used to set DEVICE_NAME variable.\r
-REM Valid values are 'k2k', 'k2h'. Defaults to 'k2h'.\r
+REM Valid values are 'k2k', 'k2h', 'k2l'. Defaults to 'k2h'.\r
 set tempVar1=%1\r
 if not defined tempVar1 goto nodevice\r
 set DEVICE_NAME=%tempVar1%\r
@@ -92,25 +92,39 @@ REM Valid Values are 'ELF' and 'COFF'
 set OUTPUT_FORMAT=ELF\r
 \r
 REM Version of CG-Tools\r
-set CGT_VERSION=7.4.1\r
+set CGT_VERSION=7.4.4\r
 \r
 REM Version of XDC\r
-set XDC_VERSION=3.24.05.48\r
+set XDC_VERSION=3.25.05.94\r
 \r
 REM Version of BIOS\r
-set BIOS_VERSION=6.34.02.18\r
+set BIOS_VERSION=6.37.00.20\r
 \r
 REM Version of the IPC\r
-set IPC_VERSION=1.25.00.04\r
+set IPC_VERSION=3.22.00.04\r
 \r
-REM EDMA3 Version \r
-set EDMA_VERSION=02.11.05\r
+REM EDMA3 Version\r
+set EDMA_VERSION=02.11.11.15\r
 \r
 REM Version of the PDK\r
-set PDK_VERSION=1.00.00.07\r
-\r
-REM RTSC Platform Name\r
+set PDK_VERSION=3.01.00.01\r
+\r
+REM PDK Part Number & Platform name\r
+if %DEVICE_NAME% == k2k (\r
+set PDK_PARTNO=TCI6638\r
+set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6638K2K\r
+) else if  %DEVICE_NAME% == k2h (\r
+set PDK_PARTNO=TCI6636\r
+set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6636K2H\r
+) else if  %DEVICE_NAME% == k2l (\r
+set PDK_PARTNO=TCI6630\r
+set RTSC_PLATFORM_NAME=ti.platforms.evmTCI6630K2L\r
+REM Temporarily using simKepler \r
+REM set RTSC_PLATFORM_NAME=ti.platforms.simKepler\r
+) else (\r
+set PDK_PARTNO=TCI6634\r
 set RTSC_PLATFORM_NAME=ti.platforms.simKepler\r
+)\r
 \r
 REM RTSC Target \r
 REM - Please ensure that you select this taking into account the\r
index 8e50510947dcab21bfbb0da82cb25af7fb1fff33..b4059950e9bc1747dce7fbededb5b2532aee92bb 100755 (executable)
@@ -38,15 +38,22 @@ REM Covert variables for short path
 for /f "tokens=1* delims=" %%a in ('cmd /q/c path2dos %CCS_ROOT%') do (set CCS_ROOT=%%a)\r
 REM ============================================================================\r
 \r
+\r
+REM set the PDK install path\r
+IF DEFINED PDK_INSTALL_PATH GOTO pdk_defined\r
+set PDK_INSTALL_PATH="%CCS_ROOT%/pdk_keystone2_3_01_00_01/packages"\r
+:pdk_defined\r
+\r
 @REM EDMA3 LLD installation path variables\r
-set EDMA3LLD_BIOS6_INSTALLDIR=%CCS_ROOT%/MCSDK_3A7/edma3_lld_02_11_05_02\r
+set EDMA3LLD_BIOS6_INSTALLDIR=%CCS_ROOT%/edma3_lld_02_11_11_15\r
 \r
-@REM PDK installation path\r
-set PDK_INSTALL_PATH=%CCS_ROOT:/=\%\MCSDK_3A7\pdk_keystone2_1_00_00_07\packages\r
+@REM set the Code Gen tools\r
+set C6X_GEN_INSTALL_PATH=%CCS_ROOT%/ccsv5/tools/compiler/c6000_7.4.4\r
+set XDCCGROOT=%C6X_GEN_INSTALL_PATH%\r
 \r
 @REM Specify the XDC Tool Path\r
-REM set XDC_INSTALL_PATH=T:/gen/xdc/xdctools_3_20_07_86\r
-set XDC_INSTALL_PATH=%CCS_ROOT%/MCSDK_3A7/xdctools_3_24_05_48\r
+set XDC_INSTALL_PATH="C:/ti/xdctools_3_25_05_94"\r
+set XDCPATH=../../..;%XDC_INSTALL_PATH%/packages\r
 \r
 @REM Third Party Tools: Coverity \r
 set STATIC_ANALYZE_PATH=T:\gen\coverity\prevent-mingw-3.8.0\r
@@ -57,12 +64,12 @@ set XDC_ECLIPSE_PLUGIN_INSTALL_PATH=T:/gen/xdc/xdc_eclipse_plugin_gen/20091203
 \r
 @REM XDC filete for creating simple makefile\r
 set XDC_FILTER_INSTALL_PATH=T:/gen/xdc/xdcFilter/20100428\r
+set XDCPATH=%XDCPATH%;%XDC_ECLIPSE_PLUGIN_INSTALL_PATH%\r
+set XDCPATH=%XDCPATH%;%XDC_FILTER_INSTALL_PATH%\r
 \r
-@REM set the Code Gen tools\r
-set C6X_GEN_INSTALL_PATH=C:/ti/ccsv5/tools/compiler/c6000_7.4.1\r
 \r
 @REM set the CG XML path\r
-set CG_XML_BIN_INSTALL_PATH=T:/SDOApps/cg_xml/cg_xml_v2_20_00/bin\r
+set CG_XML_BIN_INSTALL_PATH=%CCS_ROOT%/cg_xml/bin\r
 \r
 @REM Third Party Tools: Doxygen\r
 set DOXYGEN_INSTALL_PATH=T:\Doxygen\doxygen\1.5.1-p1\bin\r
index 044bf9f35440b8396e2c0b9e9a97bf53721233a9..39ad454b8c24881d41df5b7452cda186be0e150a 100644 (file)
@@ -3,7 +3,7 @@
  *\r
  *  \brief  TCP3D Driver functions.\r
  *\r
- *  Copyright (C) Texas Instruments Incorporated 2009\r
+ *  Copyright (C) Texas Instruments Incorporated 2009, 2014\r
  * \r
  *  Redistribution and use in source and binary forms, with or without \r
  *  modification, are permitted provided that the following conditions \r
@@ -491,20 +491,14 @@ Tcp3d_Result Tcp3d_enqueueCodeBlock(IN  Tcp3d_Instance  *tcp3dInst,
     EDMA3_DRV_PaRAMRegs     *prmSd;\r
     EDMA3_DRV_PaRAMRegs     *prevLastPrmPtr;\r
     EDMA3_DRV_PaRAMRegs     *prmWrap;\r
-    uint32_t                l2pCh[2];\r
-    uint16_t                revtLink[2];\r
-    uint16_t                ntfdLink[2];\r
+\r
     uint16_t                ntfLink[2];\r
     uint16_t                stsLink[2];\r
     uint16_t                sdLink[2];\r
     uint32_t                wrapLink[2];\r
+    uint16_t                chainToNextCbDummyLink[2];\r
+    uint16_t                chainToNextCbNtfdLink[2];\r
 \r
-    l2pCh[PING_INDEX]    = tcp3dInst->pingCh[TCP3D_DRV_CH_IDX_L2P];\r
-    l2pCh[PONG_INDEX]    = tcp3dInst->pongCh[TCP3D_DRV_CH_IDX_L2P];\r
-    revtLink[PING_INDEX] = tcp3dInst->pingLinkChParamAddr[LINK_CH_IDX_REVT];\r
-    revtLink[PONG_INDEX] = tcp3dInst->pongLinkChParamAddr[LINK_CH_IDX_REVT];\r
-    ntfdLink[PING_INDEX] = tcp3dInst->pingLinkChParamAddr[LINK_CH_IDX_NTFD];\r
-    ntfdLink[PONG_INDEX] = tcp3dInst->pongLinkChParamAddr[LINK_CH_IDX_NTFD];\r
     ntfLink[PING_INDEX]  = tcp3dInst->pingLinkChParamAddr[LINK_CH_IDX_NTF];\r
     ntfLink[PONG_INDEX]  = tcp3dInst->pongLinkChParamAddr[LINK_CH_IDX_NTF];\r
     stsLink[PING_INDEX]  = tcp3dInst->pingLinkChParamAddr[LINK_CH_IDX_STS];\r
@@ -513,6 +507,10 @@ Tcp3d_Result Tcp3d_enqueueCodeBlock(IN  Tcp3d_Instance  *tcp3dInst,
     sdLink[PONG_INDEX]   = tcp3dInst->pongLinkChParamAddr[LINK_CH_IDX_SD];\r
     wrapLink[PING_INDEX] = tcp3dInst->pingLinkChParamAddr[LINK_CH_IDX_WRAP];\r
     wrapLink[PONG_INDEX] = tcp3dInst->pongLinkChParamAddr[LINK_CH_IDX_WRAP];\r
+    chainToNextCbDummyLink[PING_INDEX] = tcp3dInst->pingLinkChParamAddr[LINK_CH_IDX_NEXTCB_DUMMY];\r
+    chainToNextCbDummyLink[PONG_INDEX] = tcp3dInst->pongLinkChParamAddr[LINK_CH_IDX_NEXTCB_DUMMY];\r
+    chainToNextCbNtfdLink[PING_INDEX] = tcp3dInst->pingLinkChParamAddr[LINK_CH_IDX_NEXTCB_NTFD];\r
+    chainToNextCbNtfdLink[PONG_INDEX] = tcp3dInst->pingLinkChParamAddr[LINK_CH_IDX_NEXTCB_NTFD];\r
 \r
 #if TWO_PATHS\r
     /* get next available path index */\r
@@ -680,9 +678,6 @@ Tcp3d_Result Tcp3d_enqueueCodeBlock(IN  Tcp3d_Instance  *tcp3dInst,
             /* Get the previous last output PaRAM, used in chaining */\r
             prevLastPrmPtr  = tcp3dInst->lastParam[pathFlag];\r
     \r
-            /* Change the TCC to L2P */\r
-            CSL_FINS(prevLastPrmPtr->opt, TPCC_PARAM_OPT_TCC, l2pCh[pathFlag]);\r
-\r
             /**\r
              * If previous block has notification, change the previous param\r
              * link to NTFD, otherwise change to dummy REVT link PaRAM.\r
@@ -690,12 +685,12 @@ Tcp3d_Result Tcp3d_enqueueCodeBlock(IN  Tcp3d_Instance  *tcp3dInst,
             if ( tcp3dInst->prevNtfFlag[pathFlag] )\r
             {\r
                 /* Change the LINK to interrupt Notify PaRAM */\r
-                prevLastPrmPtr->linkAddr = ntfdLink[pathFlag];\r
+                prevLastPrmPtr->linkAddr = chainToNextCbNtfdLink[pathFlag];\r
             }\r
             else\r
             {\r
                 /* Change the LINK to dummy REVT PaRAM */\r
-                prevLastPrmPtr->linkAddr = revtLink[pathFlag];\r
+                prevLastPrmPtr->linkAddr = chainToNextCbDummyLink[pathFlag];\r
             }\r
         }\r
 \r
@@ -1063,7 +1058,7 @@ static void Tcp3d_setLocalVariables (IN Tcp3d_Instance   *tcp3dInst)
 \r
     /* Store pointers for the end of list (PING starts first in the list)*/\r
     prm = &tcp3dInst->pseudoParamBufPtr[(tcp3dInst->maxCodeBlocks-2)*TCP3D_DRV_LINK_CB];\r
-    if ( tcp3dInst->maxCodeBlocks % 1 )\r
+    if ( tcp3dInst->maxCodeBlocks & 1 )\r
     {  /* even */\r
         tcp3dInst->endListParam[PING_INDEX] = prm;\r
         tcp3dInst->endListParam[PONG_INDEX] = prm+TCP3D_DRV_LINK_CB;\r
@@ -1698,6 +1693,162 @@ static EDMA3_DRV_Result Tcp3d_initEdmaChParam (IN Tcp3d_Instance  *tcp3dInst)
                                 tcp3dInst->pongLinkCh[LINK_CH_IDX_WRAP],\r
                                 prm);\r
 \r
+                                \r
+    /* Link Channel - NEXTCB Dummy 0 (LINK_CH_IDX_NEXTCB_DUMMY PaRAM) */\r
+    /* chain to L2P\r
+       link to ping dummy REVT channel \r
+       A-sync\r
+       ACNT = 1\r
+       BCNT = 0\r
+       CCNT = 0\r
+       scrBIDX = 0\r
+       desBIDX = 0\r
+       scrCIDX = 0\r
+       desCIDX = 0 */\r
+    /* Fill the PaRAM Set with transfer specific information */\r
+    /* First set OPT field with appropriate values */\r
+#if TCP3D_DRV_USE_CSL_EDMA3_OPT_MAKE\r
+    prm->opt = CSL_EDMA3_OPT_MAKE ( CSL_EDMA3_ITCCH_DIS,\r
+                                    CSL_EDMA3_TCCH_EN,\r
+                                    CSL_EDMA3_ITCINT_DIS,\r
+                                    CSL_EDMA3_TCINT_DIS,\r
+                                    tcp3dInst->pingCh[TCP3D_DRV_CH_IDX_L2P],\r
+                                    CSL_EDMA3_TCC_EARLY,\r
+                                    CSL_EDMA3_FIFOWIDTH_NONE,\r
+                                    CSL_EDMA3_STATIC_DIS,\r
+                                    CSL_EDMA3_SYNC_A,\r
+                                    CSL_EDMA3_ADDRMODE_INCR,\r
+                                    CSL_EDMA3_ADDRMODE_INCR );\r
+#else\r
+    prm->opt = 0;\r
+    /* Enable Final transfer completion chain */\r
+    prm->opt |= (1 << CSL_TPCC_PARAM_OPT_TCCHEN_SHIFT);\r
+    /* Program the TCC */\r
+    CSL_FINS(prm->opt, TPCC_PARAM_OPT_TCC, tcp3dInst->pingCh[TCP3D_DRV_CH_IDX_L2P]);\r
+    /* Early Trasfer Completion */\r
+    prm->opt |= (1 << CSL_TPCC_PARAM_OPT_TCCMOD_SHIFT);\r
+    /* A Sync Transfer Mode */\r
+    prm->opt &= ~(1 << CSL_TPCC_PARAM_OPT_SYNCDIM_SHIFT);\r
+    /* Src & Dest are in INCR modes */\r
+    prm->opt &= ~(1 << CSL_TPCC_PARAM_OPT_SAM_SHIFT);\r
+    prm->opt &= ~(1 << CSL_TPCC_PARAM_OPT_DAM_SHIFT);\r
+#endif\r
+    prm->srcAddr    = NULL;\r
+    prm->destAddr   = NULL;\r
+    prm->aCnt       = 1;\r
+    prm->bCnt       = 0;\r
+    prm->cCnt       = 0;\r
+    prm->bCntReload = 0;\r
+    prm->srcBIdx    = 0;\r
+    prm->destBIdx   = 0;\r
+    prm->srcCIdx    = 0;\r
+    prm->destCIdx   = 0;\r
+    prm->linkAddr   = (0xFFFFu) & (tcp3dInst->pingLinkChParamAddr[LINK_CH_IDX_REVT]);\r
+\r
+    /* Now, write the PaRAM Set. */\r
+    status |= EDMA3_DRV_setPaRAM(tcp3dInst->edmaHnd,\r
+                                tcp3dInst->pingLinkCh[LINK_CH_IDX_NEXTCB_DUMMY],\r
+                                prm);\r
+\r
+                                \r
+    /* Link Channel - NEXTCB 1 (LINK_CH_IDX_NEXTCB_DUMMY PaRAM) */\r
+    /* chain to L2P\r
+       link to pong dummy REVT channel\r
+       A-sync\r
+       ACNT = 1\r
+       BCNT = 1\r
+       CCNT = 1\r
+       scrBIDX = 0\r
+       desBIDX = 0\r
+       scrCIDX = 0\r
+       desCIDX = 0 */\r
+    /* Fill the PaRAM Set with transfer specific information */\r
+    CSL_FINS(prm->opt, TPCC_PARAM_OPT_TCC, tcp3dInst->pongCh[TCP3D_DRV_CH_IDX_L2P]);\r
+    prm->linkAddr   = (0xFFFFu) & (tcp3dInst->pongLinkChParamAddr[LINK_CH_IDX_REVT]);\r
+\r
+    /* Now, write the PaRAM Set. */\r
+    status |= EDMA3_DRV_setPaRAM(tcp3dInst->edmaHnd,\r
+                                tcp3dInst->pongLinkCh[LINK_CH_IDX_NEXTCB_DUMMY],\r
+                                prm);\r
+                                \r
+\r
+    /* Link Channel - NEXTCB Notify Dummy 0 (LINK_CH_IDX_NEXTCB_NTFD PaRAM) */\r
+    /* chain to L2P\r
+       link to NotifyD channel \r
+       A-sync\r
+       ACNT = 1\r
+       BCNT = 0\r
+       CCNT = 0\r
+       scrBIDX = 0\r
+       desBIDX = 0\r
+       scrCIDX = 0\r
+       desCIDX = 0 */\r
+    /* Fill the PaRAM Set with transfer specific information */\r
+    /* First set OPT field with appropriate values */\r
+#if TCP3D_DRV_USE_CSL_EDMA3_OPT_MAKE\r
+    prm->opt = CSL_EDMA3_OPT_MAKE ( CSL_EDMA3_ITCCH_DIS,\r
+                                    CSL_EDMA3_TCCH_EN,\r
+                                    CSL_EDMA3_ITCINT_DIS,\r
+                                    CSL_EDMA3_TCINT_DIS,\r
+                                    tcp3dInst->pingCh[TCP3D_DRV_CH_IDX_L2P],\r
+                                    CSL_EDMA3_TCC_EARLY,\r
+                                    CSL_EDMA3_FIFOWIDTH_NONE,\r
+                                    CSL_EDMA3_STATIC_DIS,\r
+                                    CSL_EDMA3_SYNC_A,\r
+                                    CSL_EDMA3_ADDRMODE_INCR,\r
+                                    CSL_EDMA3_ADDRMODE_INCR );\r
+#else\r
+    prm->opt = 0;\r
+    /* Enable Final transfer completion chain */\r
+    prm->opt |= (1 << CSL_TPCC_PARAM_OPT_TCCHEN_SHIFT);\r
+    /* Program the TCC */\r
+    CSL_FINS(prm->opt, TPCC_PARAM_OPT_TCC, tcp3dInst->pingCh[TCP3D_DRV_CH_IDX_L2P]);\r
+    /* Early Trasfer Completion */\r
+    prm->opt |= (1 << CSL_TPCC_PARAM_OPT_TCCMOD_SHIFT);\r
+    /* A Sync Transfer Mode */\r
+    prm->opt &= ~(1 << CSL_TPCC_PARAM_OPT_SYNCDIM_SHIFT);\r
+    /* Src & Dest are in INCR modes */\r
+    prm->opt &= ~(1 << CSL_TPCC_PARAM_OPT_SAM_SHIFT);\r
+    prm->opt &= ~(1 << CSL_TPCC_PARAM_OPT_DAM_SHIFT);\r
+#endif\r
+    prm->srcAddr    = NULL;\r
+    prm->destAddr   = NULL;\r
+    prm->aCnt       = 1;\r
+    prm->bCnt       = 0;\r
+    prm->cCnt       = 0;\r
+    prm->bCntReload = 0;\r
+    prm->srcBIdx    = 0;\r
+    prm->destBIdx   = 0;\r
+    prm->srcCIdx    = 0;\r
+    prm->destCIdx   = 0;\r
+    prm->linkAddr   = (0xFFFFu) & (tcp3dInst->pingLinkChParamAddr[LINK_CH_IDX_NTFD]);\r
+\r
+    /* Now, write the PaRAM Set. */\r
+    status |= EDMA3_DRV_setPaRAM(tcp3dInst->edmaHnd,\r
+                                tcp3dInst->pingLinkCh[LINK_CH_IDX_NEXTCB_NTFD],\r
+                                prm);\r
+\r
+                                \r
+    /* Link Channel - NEXTCB Notify Dummy 1 (LINK_CH_IDX_NEXTCB_NTFD PaRAM) */\r
+    /* chain to L2P\r
+       link to NotifyD channel\r
+       A-sync\r
+       ACNT = 1\r
+       BCNT = 1\r
+       CCNT = 1\r
+       scrBIDX = 0\r
+       desBIDX = 0\r
+       scrCIDX = 0\r
+       desCIDX = 0 */\r
+    /* Fill the PaRAM Set with transfer specific information */\r
+    CSL_FINS(prm->opt, TPCC_PARAM_OPT_TCC, tcp3dInst->pongCh[TCP3D_DRV_CH_IDX_L2P]);\r
+    prm->linkAddr   = (0xFFFFu) & (tcp3dInst->pongLinkChParamAddr[LINK_CH_IDX_NTFD]);\r
+\r
+    /* Now, write the PaRAM Set. */\r
+    status |= EDMA3_DRV_setPaRAM(tcp3dInst->edmaHnd,\r
+                                tcp3dInst->pongLinkCh[LINK_CH_IDX_NEXTCB_NTFD],\r
+                                prm);                                                                                                                                                                                                                                                                                                                                                                                  \r
+\r
     return ( status );\r
 \r
 } /* end of - Tcp3d_initEdmaChParam() function */\r
index 331783461806926639b60be9e4ddd94b194a3bbf..4af228282170c692388ee572a0f0652adca87268 100644 (file)
@@ -1,6 +1,6 @@
 /*\r
  *\r
- * Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/ \r
+ * Copyright (C) 2010, 2014 Texas Instruments Incorporated - http://www.ti.com/ \r
  * \r
  * \r
  *  Redistribution and use in source and binary forms, with or without \r
@@ -76,6 +76,8 @@
 #define LINK_CH_IDX_NTF             (LINK_CH_IDX_LAST + 4)\r
 #define LINK_CH_IDX_NTFD            (LINK_CH_IDX_LAST + 5)\r
 #define LINK_CH_IDX_WRAP            (LINK_CH_IDX_LAST + 6)\r
+#define LINK_CH_IDX_NEXTCB_DUMMY    (LINK_CH_IDX_LAST + 7)\r
+#define LINK_CH_IDX_NEXTCB_NTFD     (LINK_CH_IDX_LAST + 8)\r
 \r
 #define ONE_OVER_LINK_CB_Q15        (32768/TCP3D_DRV_LINK_CB)\r
 \r
index 5f7f6650552f11ed3506847b4e78fee67ace7df5..a5fd80a01d52bd2d82df557a45034ce588688f71 100644 (file)
@@ -8,7 +8,7 @@
  *\r
  *  \par\r
  *  NOTE:\r
- *      (C) Copyright 2011 Texas Instruments, Inc.\r
+ *      (C) Copyright 2011, 2014 Texas Instruments, Inc.\r
  * \r
  *  Redistribution and use in source and binary forms, with or without \r
  *  modification, are permitted provided that the following conditions \r
 /**\r
  *  @brief  Number of Link channels used for control/reload operations.\r
  */\r
-#define TCP3D_DRV_LINK_CTRL             (4u)\r
+#define TCP3D_DRV_LINK_CTRL             (6u)\r
 \r
 /**\r
  *  @brief  Number of Link channels used for notification use.\r
@@ -438,7 +438,7 @@ typedef struct Tcp3d_InCfgParams
 /**\r
  * @brief Structure to store TCP3 decoder specific values to identify its\r
  *          instance configuration information. This is created to facilitate\r
- *          the application to choose TCP3 decoder (either TCP3D_A or TCP3D_B)\r
+ *          the application to choose TCP3 decoder (either TCP3D_0 or TCP3D_1)\r
  *          for which the driver will be configured.\r
  * \r
  *      This structure could be used for both PING and PONG specific values.\r
@@ -609,7 +609,7 @@ typedef struct Tcp3d_InitParams
 {\r
     /** \r
      * TCP3D Peripheral instance number to setup. Possible values are\r
-     *          CSL_TCP3D_A or CSL_TCP3D_B.\r
+     *          CSL_TCP3D_0 or CSL_TCP3D_1.\r
      */\r
     uint8_t                   instNum;\r
 \r
index ea047d4fb2d225e4a4b8bbfc877d6ddb3b319545..68b0ef1905d8ced46caa03db10ba95b0ea7be3e2 100644 (file)
@@ -46,7 +46,7 @@ extern "C" {
  *   @brief  TCP3D Driver Version Definitions\r
  *\r
  *  ============================================================\r
- *  Copyright (c) Texas Instruments Incorporated 2009-2011\r
+ *  Copyright (c) Texas Instruments Incorporated 2009,2011,2014\r
  * \r
  *  Redistribution and use in source and binary forms, with or without \r
  *  modification, are permitted provided that the following conditions \r
diff --git a/test/k2l/c66/bios/link_test.cmd b/test/k2l/c66/bios/link_test.cmd
new file mode 100644 (file)
index 0000000..3744eff
--- /dev/null
@@ -0,0 +1,7 @@
+SECTIONS
+{
+        .init_array: load >> L2SRAM
+       .csl_vect               > L2SRAM
+       .main_mem               > L2SRAM
+       .profile_mem    > L2SRAM
+}
diff --git a/test/k2l/c66/bios/tcp3dK2LC66BiosTestProject.txt b/test/k2l/c66/bios/tcp3dK2LC66BiosTestProject.txt
new file mode 100644 (file)
index 0000000..8947e0c
--- /dev/null
@@ -0,0 +1,18 @@
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/src/tcp3d_betaState.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/src/tcp3d_drv.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/src/tcp3d_reg.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/tcp3d_drv_sample_init.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/sample_cfg.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/tcp3d_main.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/sample_cs.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/sample_init.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/sample_int_reg.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/CpIntc_local.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/tcp3d_codeBlkSeg.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/tcp3d_inputConfigPrep.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/tcp3d_itg.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/src/tcp3d_testset_functions.c"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/k2l/c66/bios/link_test.cmd"
+-ccs.linkFile "TCP3D_INSTALL_PATH/ti/drv/tcp3d/test/k2l/c66/bios/tcp3d_drv_test.cfg"
+-ccs.setCompilerOptions "-mv6600 -g -DDEVICE_K2L -DUSE_TCP3D_DRIVER_TYPES --diag_warning=225 -I${TCP3D_INSTALL_PATH} -I${TCP3D_INSTALL_PATH}/ti/drv/tcp3d/test/src -I${TCP3D_INSTALL_PATH}/ti/drv/tcp3d/test/k2l/c66/bios"
+-rtsc.enableRtsc
diff --git a/test/k2l/c66/bios/tcp3d_drv_test.cfg b/test/k2l/c66/bios/tcp3d_drv_test.cfg
new file mode 100644 (file)
index 0000000..718dd7a
--- /dev/null
@@ -0,0 +1,125 @@
+/*
+ * ======== tcp3d_drv_test.cfg ========
+ */
+
+/* IPC packages */
+var ListMP = xdc.useModule('ti.sdo.ipc.ListMP');
+var GateMP = xdc.useModule('ti.sdo.ipc.GateMP');
+var SharedRegion = xdc.useModule('ti.sdo.ipc.SharedRegion');
+var HeapMemMP = xdc.useModule('ti.sdo.ipc.heaps.HeapMemMP');
+var MultiProc = xdc.useModule('ti.sdo.utils.MultiProc');
+var Ipc         = xdc.useModule('ti.sdo.ipc.Ipc');
+
+/*
+ * Configure System to use SysMin
+ */
+System = xdc.useModule('xdc.runtime.System');
+SysStd  = xdc.useModule('xdc.runtime.SysStd');
+System.SupportProxy = xdc.useModule('xdc.runtime.SysMin')
+System.SupportProxy = SysStd;
+System.extendedFormats = "%$S%f";
+
+/* Set the system stack - 0x2000 */
+Program.stack = 0x4000;
+
+/*
+ * Pull in BIOS modules
+ */
+xdc.useModule('ti.sysbios.BIOS');
+xdc.useModule('ti.sysbios.hal.Timer');
+xdc.useModule('ti.sysbios.knl.Semaphore');
+xdc.useModule('ti.sysbios.knl.Swi');
+xdc.useModule('ti.sysbios.knl.Task');
+xdc.useModule('ti.sysbios.hal.Cache');
+xdc.useModule('xdc.runtime.Log');
+xdc.useModule('xdc.runtime.Error');
+
+/*
+ * Memory related modules and then allocate as needed
+ */
+var Memory = xdc.useModule('xdc.runtime.Memory');
+var HeapMem = xdc.useModule('ti.sysbios.heaps.HeapMem');
+
+/* Use HeapMem for default heap manager and give it 49152 (0xC000)
+ * bytes to work with.
+ */
+Program.sectMap["systemHeap"] = Program.platform.dataMemory;
+var heapMemParams = new HeapMem.Params;
+heapMemParams.size = 0x18000;
+heapMemParams.sectionName = "systemHeap";
+Memory.defaultHeapInstance = HeapMem.create(heapMemParams);
+
+/*
+ * Creating Heap Memories for using with test application
+ */
+/* Create a heap for TCP3D input/output data using ti.bios.HeapMem. */
+/* Program.sectMap["tcp3DataSection"] = {loadSegment: "MSMCSRAM"};
+var heapMemParams1 = new HeapMem.Params;
+heapMemParams1.size = 0x180000;
+heapMemParams1.sectionName = "tcp3DataSection";
+Program.global.tcp3dDataHeap = HeapMem.create(heapMemParams1); */
+
+/* Create a heap for TCP3D driver using ti.bios.HeapMem. */
+Program.sectMap["tcp3DriverSection"] = Program.platform.dataMemory;
+var heapMemParams2 = new HeapMem.Params;
+heapMemParams2.size = 0x4000;
+heapMemParams2.sectionName = "tcp3DriverSection";
+Program.global.tcp3dDrvHeap = HeapMem.create(heapMemParams2);
+
+/* To avoid wasting shared memory for Notify and MessageQ transports */
+for (var i = 0; i < MultiProc.numProcessors; i++) {
+    Ipc.setEntryMeta({
+        remoteProcId: i,
+        setupNotify: false,
+        setupMessageQ: false,
+    });
+}
+
+
+SharedRegion.setEntryMeta(0,
+    { base: 0x0C000000,
+      len: 0x200000,
+      ownerProcId: 0,
+      cacheLineSize: 64,
+      isValid: true,
+      name: "sharemem",
+    });
+
+/*
+ * Setup the Logger for Driver
+ */
+var LoggerSys = xdc.useModule('xdc.runtime.LoggerSys');
+var LoggerSys0Params0 = new LoggerSys.Params;
+LoggerSys0Params0.instance.name = 'tcp3dDrvLog';
+Program.global.tcp3dDrvLog = LoggerSys.create(LoggerSys0Params0);
+
+/*
+ * Pull in modules for EDMA3 LLD use
+ */
+xdc.useModule('ti.sysbios.family.c64p.Hwi');
+xdc.useModule('ti.sysbios.family.c66.tci66xx.CpIntc');
+var ECM = xdc.useModule('ti.sysbios.family.c64p.EventCombiner');
+
+/*
+ * Enable Event Groups here and registering of ISR for specific GEM INTC is done
+ * using EventCombiner_dispatchPlug() and Hwi_eventMap() APIs
+ */
+ECM.eventGroupHwiNum[0] = 7;
+ECM.eventGroupHwiNum[1] = 8;
+ECM.eventGroupHwiNum[2] = 9;
+ECM.eventGroupHwiNum[3] = 10;
+
+/*******************************************************************
+ * Other Dependent packages
+ *******************************************************************/
+/*xdc.loadPackage('ti.wbi.common.api');*/
+xdc.loadPackage('ti.sdo.edma3.drv');
+
+/* Load the CSL package */
+var Csl = xdc.useModule('ti.csl.Settings');
+
+/* Device specific configuration */
+var devName = "k2l";
+Csl.deviceType = devName;
+
+/* end of file */
diff --git a/test/k2l/c66/bios/tcp3d_osal.h b/test/k2l/c66/bios/tcp3d_osal.h
new file mode 100644 (file)
index 0000000..2b308dc
--- /dev/null
@@ -0,0 +1,60 @@
+/**
+ *   @file  tcp3d_osal.h
+ *
+ *   @brief   
+ *      This is the OS adaptation layer for the TCP3D Driver which has 
+ *      been ported for XDC Runtime and BIOS.
+ *
+ *      This is an example of <b> Approach 2 </b> in which the 
+ *      application rebuilds the TCP3D driver with the new definitions.
+ *
+ *      Please refer to the 'tcp3d_osal.h' in the API documentation.
+ *
+ *  \par
+ *  NOTE:
+ *      (C) Copyright 2009 Texas Instruments, Inc.
+ * 
+ *  Redistribution and use in source and binary forms, with or without 
+ *  modification, are permitted provided that the following conditions 
+ *  are met:
+ *
+ *    Redistributions of source code must retain the above copyright 
+ *    notice, this list of conditions and the following disclaimer.
+ *
+ *    Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the 
+ *    documentation and/or other materials provided with the   
+ *    distribution.
+ *
+ *    Neither the name of Texas Instruments Incorporated nor the names of
+ *    its contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
+ *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
+ *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
+ *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+ *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+ *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+ *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+*/
+#ifndef __TCP3D_OSAL_H__
+#define __TCP3D_OSAL_H__
+
+#include <xdc/runtime/System.h>
+#include <ti/sysbios/BIOS.h>
+
+/* TCP3D OSAL Logging API is mapped directly to an XDC Runtime API */
+#define Tcp3d_osalLog           System_printf
+
+/* TCP3D OSAL memory operation APIs are mapped directly with standard runtime APIs */
+#define Tcp3d_memcpy            memcpy
+#define Tcp3d_memset            memset
+
+#endif /* __TCP3D_OSAL_H__ */
+
index 8b29341534001fa096e18e3356a8385a682f19b4..3eb81de7d552d9e668a7c1e954ffc93372f311cf 100644 (file)
@@ -67,6 +67,7 @@
 #include <ti/csl/csl_tsc.h>\r
 #include <ti/csl/csl_cacheAux.h>\r
 #include <ti/csl/csl_xmcAux.h>\r
+#include <ti/csl/csl_pscAux.h>\r
 \r
 #include "sample.h"\r
 #include "tcp3d_drv_sample.h"\r
  **********************************************************************/\r
 #define START_CMD_PERIOD            1\r
 \r
-#define SIMULATOR_SUPPORT           0\r
-\r
 /**********************************************************************\r
  ************************** Test Variables ****************************\r
  **********************************************************************/\r
@@ -127,7 +126,7 @@ cbTestDesc              codeBlockSet;
 \r
 Char                    *strMode[4] = {"3GPP(0)","LTE(1)","WIMAX(2)","WCDMA Split(3)"};\r
 Char                    *strDBuf[2] = {"Disable(0)","Enable(1)"};\r
-Char                    *strInst[2] = {"TCP3D_A(0)","TCP3D_B(1)"};\r
+Char                    *strInst[2] = {"TCP3D_0(0)","TCP3D_1(1)"};\r
 \r
 UInt32                  keepTestVectMem = 0;\r
 UInt32                  firstTime = 1;\r
@@ -403,14 +402,8 @@ Void testerTaskFunc(Void)
     dspCoreID           = CSL_chipReadDNUM();\r
 \r
     /******** Select the TCP3D Instance Number **********/\r
-#if 0\r
-    if ( dspCoreID == 0 ) // Core 0\r
-        instNum = CSL_TCP3D_A;\r
-    else\r
-        instNum = CSL_TCP3D_B;\r
-#else\r
     instNum = getTcp3dInstNum(dspCoreID);\r
-#endif\r
+\r
     /******** Clear TCP3D log file **********/\r
     PROF_LOG_INIT(instNum);\r
 \r
@@ -565,7 +558,7 @@ Void testerTaskFunc(Void)
         System_printf("Code blocks sent for decoding    : %d\n", codeBlockSet.maxNumCB);\r
         System_printf("Call back counters               : %d - interrupts\n", pauseIntr);\r
         System_printf("                          (%d-SOLDOUT, %d-PAUSE, %d-PENDPAUSE)\n", afterIntrSoldout, afterIntrPause, pendPauseCntr);\r
-        System_printf("Total Notificaiton Interrupts    : %d\n", tcp3dEventCntr);\r
+        System_printf("Total Notification Interrupts    : %d\n", tcp3dEventCntr);\r
         System_printf("Throughput Calculations\n");\r
         System_printf("    Total Bits Decoded           : %d\n", TotalBitsDecoded);\r
         System_printf("    Time Taken (in cycles)       : %d\n", test_cycles);\r
@@ -1098,7 +1091,7 @@ Void getMemoryStats(Void)
     Memory_Stats        memStats;\r
 \r
     Memory_getStats(drvHeap, &memStats);\r
-    System_printf("\nHeap Usage/Staus\n");\r
+    System_printf("\nHeap Usage/Status\n");\r
     System_printf("    tcp3dDrvHeap : %d of %d free\n", memStats.totalFreeSize, memStats.totalSize);\r
 \r
     Memory_getStats(dataHeap, &memStats);\r
@@ -1190,11 +1183,7 @@ Void allInit(Void)
     EDMA3_DRV_Result    edmaResult = EDMA3_DRV_SOK;\r
 \r
 #if TEST_PROFILE_LOG\r
-#if 0\r
-    CSL_Tcp3d_cfgRegs   *tcp3dCfgRegs = (CSL_Tcp3d_cfgRegs *) ((instNum == CSL_TCP3D_A)? CSL_TCP3D_A_CFG_REGS: CSL_TCP3D_B_CFG_REGS);\r
-#else\r
     CSL_Tcp3d_cfgRegs   *tcp3dCfgRegs = (CSL_Tcp3d_cfgRegs *) getTcp3dCfgRegsBase(instNum);\r
-#endif\r
 #endif\r
 \r
     /* Initialize EDMA3 first */\r
@@ -1343,27 +1332,27 @@ static Int32 enable_tcp3d (void)
      * This is not required for the simulator. */\r
 \r
     /* Set TCP3D Power domain to ON */        \r
-    CSL_PSC_enablePowerDomain (CSL_PSC_PD_TCP3D);\r
+    CSL_PSC_enablePowerDomain (TEST_CSL_PSC_PD_TCP3D);\r
 \r
     /* Enable the clocks too for TCP3D */\r
-    CSL_PSC_setModuleNextState (CSL_PSC_LPSC_TCP3D, PSC_MODSTATE_ENABLE);\r
+    CSL_PSC_setModuleNextState (TEST_CSL_PSC_LPSC_TCP3D, PSC_MODSTATE_ENABLE);\r
 \r
     /* Start the state transition */\r
-    CSL_PSC_startStateTransition (CSL_PSC_PD_TCP3D);\r
+    CSL_PSC_startStateTransition (TEST_CSL_PSC_PD_TCP3D);\r
 \r
     /* Wait until the state transition process is completed. */\r
-    while (!CSL_PSC_isStateTransitionDone (CSL_PSC_PD_TCP3D));\r
+    while (!CSL_PSC_isStateTransitionDone (TEST_CSL_PSC_PD_TCP3D));\r
 \r
     /* Return TCP3D PSC status */\r
-    if ((CSL_PSC_getPowerDomainState(CSL_PSC_PD_TCP3D) == PSC_PDSTATE_ON) &&\r
-        (CSL_PSC_getModuleState (CSL_PSC_LPSC_TCP3D) == PSC_MODSTATE_ENABLE))\r
+    if ((CSL_PSC_getPowerDomainState(TEST_CSL_PSC_PD_TCP3D) == PSC_PDSTATE_ON) &&\r
+        (CSL_PSC_getModuleState (TEST_CSL_PSC_LPSC_TCP3D) == PSC_MODSTATE_ENABLE))\r
     {\r
         /* TCP3D ON. Ready for use */            \r
         return 0;\r
     }\r
     else\r
     {\r
-        /* SRIO Power on failed. Return error */            \r
+        /* TCP3D Power on failed. Return error */            \r
         return -1;            \r
     }\r
 #else\r
index 32d7b09edf1518ba61322fec79ee3bd1bcb1254c..92bf07d158aa0cd6610a61982ded91a1a55c1ecd 100644 (file)
 #define TEST_INTR_ENABLE        1\r
 #define TEST_INTR_DISABLE       0\r
 \r
+/* Enable the correct power domain for the device. */\r
+#ifdef DEVICE_K2L\r
+#define TEST_CSL_PSC_PD_TCP3D       CSL_PSC_PD_TCP3D_0\r
+#define TEST_CSL_PSC_LPSC_TCP3D     CSL_PSC_LPSC_TCP3D_0\r
+#else /* DEVICE_K2K, DEVICE_K2H */\r
+#define TEST_CSL_PSC_PD_TCP3D       CSL_PSC_PD_TCP3D_01\r
+#define TEST_CSL_PSC_LPSC_TCP3D     CSL_PSC_LPSC_TCP3D_0\r
+#endif\r
+\r
 /**********************************************************************\r
  ************************** Test Structures ***************************\r
  **********************************************************************/\r
index 946697de46e932953334b6099fac3bbcf2ce9df6..feff0288444f1ea86f440740c86121791c9636fb 100644 (file)
 /**\r
  * Test TCP3D Notification Events\r
  */\r
-#define TCP3D_A_TEST_EVENT              7\r
-#define TCP3D_B_TEST_EVENT              23\r
+#define TCP3D_0_TEST_EVENT              7\r
+#define TCP3D_1_TEST_EVENT              23\r
 \r
 /**\r
  * This gives the channel numbers to which the TCP3 decoder REVTs are mapped.\r
- * ((per spec intc_1.3.4.12.xlsx, TPCC2)\r
+ * ((per Data sheet SPRS835C, SPRS893 and internal spec \r
+ * intc_1.3.4.12.xlsx,TPCC2)\r
  */\r
-#define TCP3D_A_REVT0_CH_NUMBER         34\r
-#define TCP3D_A_REVT1_CH_NUMBER         35\r
-#define TCP3D_B_REVT0_CH_NUMBER         36\r
-#define TCP3D_B_REVT1_CH_NUMBER         37\r
+#define TCP3D_0_REVT0_CH_NUMBER         34\r
+#define TCP3D_0_REVT1_CH_NUMBER         35\r
+#define TCP3D_1_REVT0_CH_NUMBER         36\r
+#define TCP3D_1_REVT1_CH_NUMBER         37\r
 \r
 INLINE UInt32 getHostIntrNum(UInt32 dspCoreID)\r
 {\r
@@ -64,9 +65,9 @@ INLINE UInt32 getNotifyEventNum(UInt8 instNum)
     UInt32 testEvt;\r
 \r
     if ( instNum == CSL_TCP3D_0 )\r
-        testEvt = TCP3D_A_TEST_EVENT; //  First instance\r
+        testEvt = TCP3D_0_TEST_EVENT; //  First instance\r
     else\r
-        testEvt = TCP3D_B_TEST_EVENT; //  Second instance\r
+        testEvt = TCP3D_1_TEST_EVENT; //  Second instance\r
 \r
     return testEvt;\r
 }\r
@@ -88,9 +89,9 @@ INLINE UInt32 getRevt0ChannelNum(UInt8 instNum)
     UInt32 chNum;\r
 \r
     if ( instNum == CSL_TCP3D_0 )\r
-        chNum = TCP3D_A_REVT0_CH_NUMBER; //  First instance\r
+        chNum = TCP3D_0_REVT0_CH_NUMBER; //  First instance\r
     else\r
-        chNum = TCP3D_B_REVT0_CH_NUMBER; //  Second instance\r
+        chNum = TCP3D_1_REVT0_CH_NUMBER; //  Second instance\r
 \r
     return chNum;\r
 }\r
@@ -100,9 +101,9 @@ INLINE UInt32 getRevt1ChannelNum(UInt8 instNum)
     UInt32 chNum;\r
 \r
     if ( instNum == CSL_TCP3D_0 )\r
-        chNum = TCP3D_A_REVT1_CH_NUMBER; //  First instance\r
+        chNum = TCP3D_0_REVT1_CH_NUMBER; //  First instance\r
     else\r
-        chNum = TCP3D_B_REVT1_CH_NUMBER; //  Second instance\r
+        chNum = TCP3D_1_REVT1_CH_NUMBER; //  Second instance\r
 \r
     return chNum;\r
 }\r
index 2d535196e26523d5061d75e90c5a9530c086b2d7..9e0563bbd7151b289247475cc38b3fcdb9f245a1 100644 (file)
 /**\r
  * Test TCP3D Notification Events\r
  */\r
-#define TCP3D_A_TEST_EVENT              23\r
+#define TCP3D_0_TEST_EVENT              7\r
 \r
 /**\r
  * This gives the channel numbers to which the TCP3 decoder REVTs are mapped.\r
- * (as per spec nysh_INTERNAL_1_0_7.pdf)\r
+ * ((per Data sheet SPRS835C, SPRS893 and internal spec \r
+ * intc_1.3.4.12.xlsx,TPCC2)\r
  */\r
-#define TCP3D_A_REVT0_CH_NUMBER         0\r
-#define TCP3D_A_REVT1_CH_NUMBER         1\r
+#define TCP3D_0_REVT0_CH_NUMBER         34\r
+#define TCP3D_0_REVT1_CH_NUMBER         35\r
 \r
 INLINE UInt32 getHostIntrNum(UInt32 dspCoreID)\r
 {\r
     /* Host Interrupts for CPINTC0 (per spec - 0.0.1) */\r
-    UInt32  hostIntr[] = {6u, 26u, 46u, 66u};\r
+    UInt32  hostIntr[] = {13u, 29u, 45u, 61u};\r
 \r
     return hostIntr[dspCoreID];\r
 }\r
 \r
 INLINE UInt32 getNotifyEventNum(UInt8 instNum)\r
 {\r
-    return TCP3D_A_TEST_EVENT;\r
+    return TCP3D_0_TEST_EVENT;\r
 }\r
 \r
 INLINE CSL_TPCC_ShadowRegs * getEdma3ShadowRegsBase(UInt32 regionNum)\r
@@ -75,27 +76,27 @@ INLINE UInt32 getCpIntc0RegsBase()
 \r
 INLINE UInt32 getRevt0ChannelNum(UInt8 instNum)\r
 {\r
-    return TCP3D_A_REVT0_CH_NUMBER;\r
+    return TCP3D_0_REVT0_CH_NUMBER;\r
 }\r
 \r
 INLINE UInt32 getRevt1ChannelNum(UInt8 instNum)\r
 {\r
-    return TCP3D_A_REVT1_CH_NUMBER;\r
+    return TCP3D_0_REVT1_CH_NUMBER;\r
 }\r
 \r
 INLINE UInt8 getTcp3dInstNum(UInt32 dspCoreID)\r
 {\r
-    return CSL_TCP3D_A;\r
+    return CSL_TCP3D_0;\r
 }\r
 \r
 INLINE UInt32 getTcp3dCfgRegsBase(UInt8 instNum)\r
 {\r
-    return CSL_TCP3D_A_CFG_REGS;\r
+    return CSL_TCP3D_0_CFG_REGS;\r
 }\r
 \r
 INLINE UInt32 getTcp3dDataRegsBase(UInt8 instNum)\r
 {\r
-    return CSL_TCP3D_A_DATA_REGS;\r
+    return CSL_TCP3D_0_DATA_REGS;\r
 }\r
 \r
 #endif  /* _TCP3D_SINGLE_INST_H_ */\r