- Fix for SDOCM00108178 in src/tcp3d_drv.c.
authorPragat Chaudhari <pragatc@ti.com>
Fri, 6 Jun 2014 15:09:07 +0000 (11:09 -0400)
committerPragat Chaudhari <pragatc@ti.com>
Fri, 6 Jun 2014 15:09:07 +0000 (11:09 -0400)
   - Fix for SDOCM00106473 in src/tcp3d_drv.c, src/tcp3d_drv_priv.h,
     tcp3d_drv.h
   - Correction to enable_tcp3d() function in example and test projects
     for K2L and K2H/K2K.
   - Addition of Word design document, and associated visio files
     containing diagrams.

18 files changed:
docs/ReleaseNotes_TCP3DDriver.doc
docs/ReleaseNotes_TCP3DDriver.pdf
docs/TCP3D_DriverSDS.doc [new file with mode: 0644]
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/src/tcp3d_example_main.c
example/src/tcp3d_main.h
package.xdc
projectCreate.bat
setupenv.bat
src/tcp3d_drv.c
src/tcp3d_drv_priv.h
tcp3d_drv.h
tcp3dver.h.xdt
test/src/tcp3d_main.c
test/src/tcp3d_main.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..ed9bbba
Binary files /dev/null and b/docs/TCP3D_DriverSDS.doc 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..c9df239
Binary files /dev/null and b/docs/TCP3D_Driver_Design.vsd differ
index b0db9da6eb903d4ee3100e218304611a0e4cd189..34716606cc5171559a57557e7e174b7e4d3112f8 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
@@ -519,7 +518,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 +1025,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 +1249,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 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..3bb8b89de241dd647c2e570212bc07d52e732c92 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
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
index 8b29341534001fa096e18e3356a8385a682f19b4..4e9ce37338d995416d7fd3790bfeb2071d7644f6 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
@@ -565,7 +564,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 +1097,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
@@ -1343,27 +1342,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