MCSDK 3.0: add DDR test and emac loopback test support for evmk2h
authorHao Zhang <hzhang@ti.com>
Thu, 7 Feb 2013 19:16:41 +0000 (14:16 -0500)
committerHao Zhang <hzhang@ti.com>
Thu, 7 Feb 2013 19:16:41 +0000 (14:16 -0500)
16 files changed:
post/docs/README.txt
post/evmk2h/.ccsproject [new file with mode: 0755]
post/evmk2h/.cproject [new file with mode: 0755]
post/evmk2h/.project [new file with mode: 0755]
post/evmk2h/bin/post.rmd [new file with mode: 0755]
post/evmk2h/bin/post_i2crom.map.pp [new file with mode: 0755]
post/evmk2h/bin/post_image.rmd [new file with mode: 0755]
post/evmk2h/bin/post_romparse.bat [new file with mode: 0755]
post/evmk2h/bin/post_romparse.sh [new file with mode: 0755]
post/evmk2h/macros.ini [new file with mode: 0755]
post/evmk2h/post.cmd [new file with mode: 0755]
post/include/cpdma_loc.h [changed mode: 0644->0755]
post/include/post.h
post/include/target.h [changed mode: 0644->0755]
post/src/cpdma.c [changed mode: 0644->0755]
post/src/post.c

index a53bb092cf485bbd97b1c275b8102978aafac068..77a392ffe4139321b7a24da65517bebd2683f5c0 100755 (executable)
@@ -51,11 +51,11 @@ Steps to program POST to EEPROM:
    boot the POST directly from the EEPROM after POR. The boot status and test result can be monitored using the Hyper
    Terminal as mentioned in "Steps to run POST in CCSv5".
 
-Please refer to C6678L/C6670L/C6657L/TCI6634K2K EVM boot mode dip switch settings:
+Please refer to C6678L/C6670L/C6657L/TCI6636K2H EVM boot mode dip switch settings:
 http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
 http://processors.wiki.ti.com/index.php/TMDXEVM6670L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
 http://processors.wiki.ti.com/index.php/TMDSEVM6657L_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings
-http://processors.wiki.ti.com/index.php/TMDSEVMK2K_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings (TBD)
+http://processors.wiki.ti.com/index.php/TCI6636K2H_EVM_Hardware_Setup#Boot_Mode_Dip_Switch_Settings (TBD)
 
 and User's Guide for more details:
 http://processors.wiki.ti.com/index.php/BIOS_MCSDK_x.0_User_Guide 
\ No newline at end of file
diff --git a/post/evmk2h/.ccsproject b/post/evmk2h/.ccsproject
new file mode 100755 (executable)
index 0000000..e82706d
--- /dev/null
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<?ccsproject version="1.0"?>
+
+<projectOptions>
+<deviceVariant value="com.ti.ccstudio.deviceModel.C6000.CustomC6000Device"/>
+<deviceEndianness value="little"/>
+<codegenToolVersion value="7.2.4"/>
+<isElfFormat value="true"/>
+<rts value="rts6600_elf.lib"/>
+<deviceFamily value="C6000"/>
+</projectOptions>
diff --git a/post/evmk2h/.cproject b/post/evmk2h/.cproject
new file mode 100755 (executable)
index 0000000..2809d20
--- /dev/null
@@ -0,0 +1,101 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>\r
+<?fileVersion 4.0.0?>\r
+\r
+<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">\r
+       <storageModule configRelations="2" moduleId="org.eclipse.cdt.core.settings">\r
+               <cconfiguration id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513">\r
+                       <storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513" moduleId="org.eclipse.cdt.core.settings" name="Release">\r
+                               <macros>\r
+                                       <stringMacro name="TI_MCSDK_POST_DIR" type="VALUE_PATH_DIR" value="${PROJECT_ROOT}/../.."/>\r
+                               </macros>\r
+                               <externalSettings/>\r
+                               <extensions>\r
+                                       <extension id="com.ti.ccstudio.binaryparser.CoffParser" point="org.eclipse.cdt.core.BinaryParser"/>\r
+                                       <extension id="com.ti.ccstudio.errorparser.LinkErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="com.ti.ccstudio.errorparser.CoffErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                                       <extension id="com.ti.ccstudio.errorparser.AsmErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>\r
+                               </extensions>\r
+                       </storageModule>\r
+                       <storageModule moduleId="org.eclipse.cdt.core.pathentry"/>\r
+                       <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+                               <configuration artifactExtension="out" artifactName="../bin/post_evmk2h" buildProperties="" cleanCommand="${CG_CLEAN_CMD}" description="" errorParsers="com.ti.ccstudio.errorparser.LinkErrorParser;com.ti.ccstudio.errorparser.CoffErrorParser;com.ti.ccstudio.errorparser.AsmErrorParser" id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513" name="Release" parent="com.ti.ccstudio.buildDefinitions.C6000.Debug">\r
+                                       <folderInfo id="com.ti.ccstudio.buildDefinitions.C6000.Debug.1869204513." name="/" resourcePath="">\r
+                                               <toolChain id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.DebugToolchain.2001978243" name="TI Build Tools" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.DebugToolchain" targetTool="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerDebug.673602521">\r
+                                                       <option id="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS.275808649" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_TAGS" valueType="stringList">\r
+                                                               <listOptionValue builtIn="false" value="DEVICE_CONFIGURATION_ID=com.ti.ccstudio.deviceModel.C6000.CustomC6000Device"/>\r
+                                                               <listOptionValue builtIn="false" value="DEVICE_ENDIANNESS=little"/>\r
+                                                               <listOptionValue builtIn="false" value="OUTPUT_FORMAT=ELF"/>\r
+                                                               <listOptionValue builtIn="false" value="CCS_MBS_VERSION=5.1.0.01"/>\r
+                                                               <listOptionValue builtIn="false" value="LINKER_COMMAND_FILE=post.cmd"/>\r
+                                                               <listOptionValue builtIn="false" value="RUNTIME_SUPPORT_LIBRARY=libc.a"/>\r
+                                                               <listOptionValue builtIn="false" value="RTSC_PRODUCTS=ti.pdk:1.0.0.05;com.ti.rtsc.NDK:2.21.1.38;com.ti.rtsc.SYSBIOS:6.33.6.50;"/>\r
+                                                               <listOptionValue builtIn="false" value="OUTPUT_TYPE=rtscApplication:executable"/>\r
+                                                       </option>\r
+                                                       <option id="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION.510961119" name="Compiler version" superClass="com.ti.ccstudio.buildDefinitions.core.OPT_CODEGEN_VERSION" value="7.3.4" valueType="string"/>\r
+                                                       <targetPlatform id="com.ti.ccstudio.buildDefinitions.C6000_7.3.library.targetPlatformDebug.608323310" name="Platform" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.library.targetPlatformDebug"/>\r
+                                                       <builder buildPath="${BuildDirectory}" id="com.ti.ccstudio.buildDefinitions.C6000_7.3.library.builderDebug.1393087542" keepEnvironmentInBuildfile="false" name="GNU Make" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.library.builderDebug"/>\r
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.3.library.compilerDebug.1240614699" name="C6000 Compiler" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.library.compilerDebug">\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.SILICON_VERSION.584293016" name="Target processor version (--silicon_version, -mv)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.SILICON_VERSION" value="6600" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DEBUGGING_MODEL.1615818557" name="Debugging model" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DEBUGGING_MODEL" value="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DEBUGGING_MODEL.SYMDEBUG__DWARF" valueType="enumerated"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.INCLUDE_PATH.188957506" name="Add dir to #include search path (--include_path, -I)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.INCLUDE_PATH" valueType="includePath">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TI_PDK_INSTALL_DIR}/packages/ti/platform&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TI_PDK_INSTALL_DIR}/packages/&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${PROJECT_ROOT}/../include&quot;"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DISPLAY_ERROR_NUMBER.239059691" name="Emit diagnostic identifier numbers (--display_error_number, -pden)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DISPLAY_ERROR_NUMBER" value="true" valueType="boolean"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DIAG_WARNING.987226579" name="Treat diagnostic &lt;id&gt; as warning (--diag_warning, -pdsw)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DIAG_WARNING" valueType="stringList">\r
+                                                                       <listOptionValue builtIn="false" value="225"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.ABI.1312414060" name="Application binary interface (coffabi, eabi) (--abi)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.ABI" value="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.ABI.eabi" valueType="enumerated"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DEFINE.1454674257" name="Pre-define NAME (--define, -D)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compilerID.DEFINE" valueType="definedSymbols">\r
+                                                                       <listOptionValue builtIn="false" value="DEVICE_K2H"/>\r
+                                                               </option>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__C_SRCS.722894367" name="C Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__C_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__CPP_SRCS.694247057" name="C++ Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__CPP_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM_SRCS.2019840691" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM_SRCS"/>\r
+                                                               <inputType id="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM2_SRCS.1580376815" name="Assembly Sources" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.compiler.inputType__ASM2_SRCS"/>\r
+                                                       </tool>\r
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.3.library.librarianDebug.1562059286" name="C6000 Archiver" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.library.librarianDebug">\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.archiverID.OUTPUT_FILE.263705444" name="Output file" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.archiverID.OUTPUT_FILE" value="&quot;../bin/post_evmk2h.out&quot;" valueType="string"/>\r
+                                                       </tool>\r
+                                                       <tool id="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerDebug.673602521" name="C6000 Linker" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.exe.linkerDebug">\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.OUTPUT_FILE.1242198386" name="Specify output file name (--output_file, -o)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.OUTPUT_FILE" value="&quot;../bin/post_evmk2h.out&quot;" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.MAP_FILE.370881078" name="Input and output sections listed into &lt;file&gt; (--map_file, -m)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.MAP_FILE" value="&quot;../bin/post_evmk2h.map&quot;" valueType="string"/>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.LIBRARY.412718443" name="Include library file or command file as input (--library, -l)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.LIBRARY" valueType="libs">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;ti.platform.evmk2h.lite.lib&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;libc.a&quot;"/>\r
+                                                               </option>\r
+                                                               <option id="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.SEARCH_PATH.1859137181" name="Add &lt;dir&gt; to library search path (--search_path, -i)" superClass="com.ti.ccstudio.buildDefinitions.C6000_7.3.linkerID.SEARCH_PATH" valueType="stringList">\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/lib&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${CG_TOOL_ROOT}/include&quot;"/>\r
+                                                                       <listOptionValue builtIn="false" value="&quot;${TI_PDK_INSTALL_DIR}/packages/ti/platform/evmk2h/platform_lib/lib/debug&quot;"/>\r
+                                                               </option>\r
+                                                       </tool>\r
+                                               </toolChain>\r
+                                       </folderInfo>\r
+                                       <sourceEntries>\r
+                                               <entry excluding="src/evmc665x_sgmii.c|src/evmc665x_emac.c" flags="VALUE_WORKSPACE_PATH|RESOLVED" kind="sourcePath" name=""/>\r
+                                       </sourceEntries>\r
+                               </configuration>\r
+                       </storageModule>\r
+                       <storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>\r
+                       <storageModule moduleId="org.eclipse.cdt.core.language.mapping"/>\r
+                       <storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>\r
+               </cconfiguration>\r
+       </storageModule>\r
+       <storageModule moduleId="cdtBuildSystem" version="4.0.0">\r
+               <project id="post.com.ti.ccstudio.buildDefinitions.C6000.ProjectType.1742876545" name="C6000" projectType="com.ti.ccstudio.buildDefinitions.C6000.ProjectType"/>\r
+       </storageModule>\r
+       <storageModule moduleId="org.eclipse.cdt.core.language.mapping">\r
+               <project-mappings>\r
+                       <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.asmSource" language="com.ti.ccstudio.core.TIASMLanguage"/>\r
+                       <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cHeader" language="com.ti.ccstudio.core.TIGCCLanguage"/>\r
+                       <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cSource" language="com.ti.ccstudio.core.TIGCCLanguage"/>\r
+                       <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxHeader" language="com.ti.ccstudio.core.TIGPPLanguage"/>\r
+                       <content-type-mapping configuration="" content-type="org.eclipse.cdt.core.cxxSource" language="com.ti.ccstudio.core.TIGPPLanguage"/>\r
+               </project-mappings>\r
+       </storageModule>\r
+       <storageModule moduleId="refreshScope"/>\r
+       <storageModule moduleId="scannerConfiguration"/>\r
+</cproject>\r
diff --git a/post/evmk2h/.project b/post/evmk2h/.project
new file mode 100755 (executable)
index 0000000..9a86eae
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+       <name>post_evmk2h</name>
+       <comment></comment>
+       <projects>
+       </projects>
+       <buildSpec>
+               <buildCommand>
+                       <name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
+                       <arguments>
+                               <dictionary>
+                                       <key>?name?</key>
+                                       <value></value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.append_environment</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.autoBuildTarget</key>
+                                       <value>all</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.buildArguments</key>
+                                       <value>-k</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.buildCommand</key>
+                                       <value>${CCS_UTILS_DIR}/bin/gmake</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.buildLocation</key>
+                                       <value>${BuildDirectory}</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.cleanBuildTarget</key>
+                                       <value>clean</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.contents</key>
+                                       <value>org.eclipse.cdt.make.core.activeConfigSettings</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.enableAutoBuild</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.enableCleanBuild</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.enableFullBuild</key>
+                                       <value>true</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.fullBuildTarget</key>
+                                       <value>all</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.stopOnError</key>
+                                       <value>false</value>
+                               </dictionary>
+                               <dictionary>
+                                       <key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
+                                       <value>true</value>
+                               </dictionary>
+                       </arguments>
+               </buildCommand>
+               <buildCommand>
+                       <name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
+                       <triggers>full,incremental,</triggers>
+                       <arguments>
+                       </arguments>
+               </buildCommand>
+       </buildSpec>
+       <natures>
+               <nature>com.ti.ccstudio.managedbuild.core.ccsNature</nature>
+               <nature>com.ti.ccstudio.core.ccsNature</nature>
+               <nature>org.eclipse.cdt.core.cnature</nature>
+               <nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
+               <nature>org.eclipse.cdt.core.ccnature</nature>
+               <nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
+       </natures>
+       <linkedResources>
+               <link>
+                       <name>README.txt</name>
+                       <type>1</type>
+                       <locationURI>TI_MCSDK_POST_DIR/post/docs/README.txt</locationURI>
+               </link>
+               <link>
+                       <name>include</name>
+                       <type>2</type>
+                       <locationURI>TI_MCSDK_POST_DIR/post/include</locationURI>
+               </link>
+               <link>
+                       <name>src</name>
+                       <type>2</type>
+                       <locationURI>TI_MCSDK_POST_DIR/post/src</locationURI>
+               </link>
+       </linkedResources>
+       <variableList>
+               <variable>
+                       <name>TI_MCSDK_POST_DIR</name>
+                       <value>$%7BPARENT-2-PROJECT_LOC%7D</value>
+               </variable>
+       </variableList>
+</projectDescription>
diff --git a/post/evmk2h/bin/post.rmd b/post/evmk2h/bin/post.rmd
new file mode 100755 (executable)
index 0000000..cb5d02d
--- /dev/null
@@ -0,0 +1,11 @@
+-a
+-boot
+-e _c_int00
+
+ROMS
+{
+       ROM1:  org = 0x0400, length = 0x10000, memwidth = 32, romwidth = 32
+       files = { post2.b }
+}
+
+
diff --git a/post/evmk2h/bin/post_i2crom.map.pp b/post/evmk2h/bin/post_i2crom.map.pp
new file mode 100755 (executable)
index 0000000..90c81c6
--- /dev/null
@@ -0,0 +1,25 @@
+section 
+{
+  param_index    = 0
+  boot_mode      = 40
+  sw_pll_prediv         = 1
+  sw_pll_mult    = 16
+  sw_pll_postdiv = 2
+  options        = 1
+
+  core_freq_mhz    = 625
+  i2c_clk_freq_khz = 200
+
+  dev_addr_ext = 0x50
+
+  multi_i2c_id = 0
+  my_i2c_id    = 1
+  address_delay = 0
+  exe_file = "post.i2c.ccs"
+}
+
+
+
+
+
+
diff --git a/post/evmk2h/bin/post_image.rmd b/post/evmk2h/bin/post_image.rmd
new file mode 100755 (executable)
index 0000000..c174d6c
--- /dev/null
@@ -0,0 +1,10 @@
+-a
+-e _c_int00
+
+ROMS
+{
+       ROM1:  org = 0x820000, length = 0x10000, memwidth = 32, romwidth = 32
+       files = { post.b }
+}
+
+
diff --git a/post/evmk2h/bin/post_romparse.bat b/post/evmk2h/bin/post_romparse.bat
new file mode 100755 (executable)
index 0000000..171e01c
--- /dev/null
@@ -0,0 +1,44 @@
+set C6000_CG_DIR="C:\ti\ccsv5\tools\compiler\c6000_7.3.4"
+set TARGET=k2h
+set ENDIAN=little
+set IBL_ROOT_DIR="..\..\..\boot_loader\ibl"
+set PATH=%PATH%;%SystemRoot%\system32;%SystemRoot%;
+
+
+@echo off
+
+echo C6000_CG_DIR set as: %C6000_CG_DIR%
+echo TARGET set as: %TARGET%
+echo IBL_ROOT_DIR set as : %IBL_ROOT_DIR%
+
+echo Converting .out to HEX ...
+if %ENDIAN% == little (
+%C6000_CG_DIR%\bin\hex6x -order L post_image.rmd post_evm%TARGET%.out
+) else (
+%C6000_CG_DIR%\bin\hex6x -order M post_image.rmd post_evm%TARGET%.out
+)
+
+%IBL_ROOT_DIR%\src\util\btoccs\b2ccs post.b post.ccs
+
+if %ENDIAN% == little (
+%C6000_CG_DIR%\bin\hex6x -order L post.rmd post_evm%TARGET%.out
+) else (
+%C6000_CG_DIR%\bin\hex6x -order M post.rmd post_evm%TARGET%.out
+)
+
+if %ENDIAN% == little (
+%IBL_ROOT_DIR%\src\util\bconvert\bconvert64x -le post2.b post.b
+) else (
+%IBL_ROOT_DIR%\src\util\bconvert\bconvert64x -be post2.b post.b
+)
+
+%IBL_ROOT_DIR%\src\util\btoccs\b2i2c post.b post.i2c.b
+
+%IBL_ROOT_DIR%\src\util\btoccs\b2ccs post.i2c.b post.i2c.ccs
+
+echo Generating I2C ROM data ...
+%IBL_ROOT_DIR%\src\util\romparse\romparse -rom_base 0x50 post_i2crom.map.pp
+
+%IBL_ROOT_DIR%\src\util\btoccs\ccs2bin -swap i2crom.ccs  post_i2crom.bin
+
+rm -f *.ccs *.b
diff --git a/post/evmk2h/bin/post_romparse.sh b/post/evmk2h/bin/post_romparse.sh
new file mode 100755 (executable)
index 0000000..53cc50b
--- /dev/null
@@ -0,0 +1,43 @@
+export CGT_INSTALL_DIR=~/ti/ccsv5/tools/compiler/c6000_7.3.4
+export TARGET=k2h
+export ENDIAN=little
+export IBL_ROOT_DIR="../../../boot_loader/ibl"
+
+echo CGT_INSTALL_DIR set as: ${CGT_INSTALL_DIR}
+echo TARGET set as: ${TARGET}
+echo IBL_ROOT_DIR set as : ${IBL_ROOT_DIR}
+
+echo Converting .out to HEX ...
+if [ ${ENDIAN} == little ]
+then
+${CGT_INSTALL_DIR}/bin/hex6x -order L post_image.rmd post_evm${TARGET}.out
+else
+${CGT_INSTALL_DIR}/bin/hex6x -order M post_image.rmd post_evm${TARGET}.out
+fi
+
+${IBL_ROOT_DIR}/src/util/btoccs/b2ccs post.b post.ccs
+
+if [ ${ENDIAN} == little ]
+then
+${CGT_INSTALL_DIR}/bin/hex6x -order L post.rmd post_evm${TARGET}.out
+else
+${CGT_INSTALL_DIR}/bin/hex6x -order M post.rmd post_evm${TARGET}.out
+fi
+
+if [ ${ENDIAN} == little ]
+then
+${IBL_ROOT_DIR}/src/util/bconvert/bconvert64x -le post2.b post.b
+else
+${IBL_ROOT_DIR}/src/util/bconvert/bconvert64x -be post2.b post.b
+fi
+
+${IBL_ROOT_DIR}/src/util/btoccs/b2i2c post.b post.i2c.b
+
+${IBL_ROOT_DIR}/src/util/btoccs/b2ccs post.i2c.b post.i2c.ccs
+
+echo Generating I2C ROM data ...
+${IBL_ROOT_DIR}/src/util/romparse/romparse -rom_base 0x50 post_i2crom.map.pp
+
+${IBL_ROOT_DIR}/src/util/btoccs/ccs2bin -swap i2crom.ccs  post_i2crom.bin
+
+rm -f *.ccs *.b
diff --git a/post/evmk2h/macros.ini b/post/evmk2h/macros.ini
new file mode 100755 (executable)
index 0000000..7c28ad8
--- /dev/null
@@ -0,0 +1 @@
+TI_MCSDK_POST_DIR="../../../../
diff --git a/post/evmk2h/post.cmd b/post/evmk2h/post.cmd
new file mode 100755 (executable)
index 0000000..9b142c8
--- /dev/null
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2011 Texas Instruments Incorporated - http://www.ti.com
+ * 
+ *  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.
+ * 
+ *****************************************************************************/
+/*
+ *  Linker command file
+ *
+ */
+
+-c
+-heap  0x4000
+-stack 0x4000
+
+/* Memory Map 1 - the default */
+MEMORY
+{
+    L1PSRAM (RWX)  : org = 0x0E00000, len = 0x7FFF
+    L1DSRAM (RWX)  : org = 0x0F00000, len = 0x7FFF 
+
+    L2SRAM (RWX)   : org = 0x0830000, len = 0x50000
+    MSMCSRAM (RWX) : org = 0xc000000, len = 0x200000
+    DDR3 (RWX)     : org = 0x80000000,len = 0x10000000
+       LINKRAM   :  origin =  0x10820000, length = 0x0200
+       CPPIRAM   :  origin =  0x10820200, length = 0x0200
+       PKTRAM    :  origin =  0x10820400, length = 0x0800
+}
+
+       
+SECTIONS
+{
+    .csl_vect   >       L2SRAM
+    .cppi       >       CPPIRAM
+    .qmss       >       L2SRAM
+    .linkram    >       LINKRAM
+    .mac_buffer >       PKTRAM
+    .version    >       L2SRAM
+    platform_lib>       L2SRAM
+    .text       >       L2SRAM
+    GROUP (NEAR_DP)
+    {
+    .neardata
+    .rodata 
+    .bss
+    } load > L2SRAM
+    .stack      >       L2SRAM
+    .cinit      >       L2SRAM
+    .cio        >       L2SRAM
+    .const      >       L2SRAM
+    .data       >       L2SRAM
+    .switch     >       L2SRAM
+    .sysmem     >       L2SRAM
+    .far        >       L2SRAM
+    .testMem    >       L2SRAM
+    .fardata    >       L2SRAM
+}
old mode 100644 (file)
new mode 100755 (executable)
index 49d78cb..80b7b12
@@ -11,6 +11,7 @@
 
 /* Emulation control register */
 #define CPDMA_REG_EMU_CTL   0x08
+#define CPDMA_REG_QM_BASE_ADDR(x)   (0x10 + (x)*0x4)
 
 /* CPPI Tx DMA channel control registers */
 #define CPDMA_REG_TCHAN_CFG_REG_A(x)   (0x00 + (x)*0x20)
index 0bbbecbda4e6ea60b5dd66bfff1c11ff7fba1994..a24773ac18a41941960b7723dacc8b6121627da8 100755 (executable)
@@ -35,7 +35,7 @@
  * POST version definitions
  ******************************************************************************/
 #define POST_EVM_VERSION_MSG        " POST Version "
-#define POST_VERSION                "01.00.00.07"
+#define POST_VERSION                "01.00.00.08"
 
 /******************************************************************************
  * PLL Controller Reset Type Status register
@@ -88,7 +88,7 @@ typedef enum
 } POST_TEST_ID;
 
 #define POST_MAX_NUM_LED        4   /* Total number of LEDs on the EVM */
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
 static uint8_t post_led_status[POST_MAX_TEST_NUM][POST_MAX_NUM_LED] =
 {
        /* LED0: red   LED0: green   LED1: blue   LED2: blue */
@@ -159,7 +159,7 @@ static char post_status[POST_MAX_TEST_NUM][POST_STATUS_MAX_NUM_CHAR] =
 /******************************************************************************
  * NAND test definitions
  ******************************************************************************/
-#if (defined(EVMC6657L) || defined(DEVICE_K2K))
+#if (defined(EVMC6657L) || defined(DEVICE_K2K) || defined(DEVICE_K2H))
        #define POST_NAND_TEST_DEVICE_ID        PLATFORM_DEVID_MT29F1G08ABCHC /* NAND device ID */
        #define POST_NAND_TEST_READ_BLOCK_NUM   0       /* NAND read block number */
        #define POST_NAND_TEST_READ_PAGE_NUM    0       /* NAND read page number */
old mode 100644 (file)
new mode 100755 (executable)
index 7ec9543..5723a46
@@ -232,11 +232,24 @@ int32_t chipPllExternalMult (uint16_t pllNum, uint16_t mult);
 #define targetGetSwitchMaxPktSize() 9000
 
 #define DEVICE_QM
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
+#define DEVICE_QM_MANAGER_BASE          0x02A02000
+#define DEVICE_QM_DESC_SETUP_BASE       0x02A03000
+#define DEVICE_QM_MANAGER_QUEUES_BASE   0x02A80000
+#define DEVICE_QM_MANAGER_Q_PROXY_BASE  0x02AC0000
+#define DEVICE_QM_QUEUE_STATUS_BASE            0x02A40000
+
+/* QM base address register */
+#define DEVICE_QM1_QUEUE_MANAGEMENT_REGS(x)  (0x23A00000 + 0x80000 + 0x10000*(x))
+#define DEVICE_QM2_QUEUE_MANAGEMENT_REGS(x)  (0x23A00000 + 0xA0000 + 0x10000*(x))
+#else
 #define DEVICE_QM_MANAGER_BASE          0x02a68000
 #define DEVICE_QM_DESC_SETUP_BASE       0x02a6a000
 #define DEVICE_QM_MANAGER_QUEUES_BASE   0x02a20000
 #define DEVICE_QM_MANAGER_Q_PROXY_BASE  0x02a40000
 #define DEVICE_QM_QUEUE_STATUS_BASE            0x02a00000
+#endif
+
 #define DEVICE_QM_NUM_LINKRAMS          2
 #define DEVICE_QM_NUM_MEMREGIONS        20
 void    *targetGetQmConfig(void);
old mode 100644 (file)
new mode 100755 (executable)
index 9f444a8..c5c2067
@@ -148,6 +148,11 @@ int16_t hwCpdmaTxConfig (const cpdmaTxCfg_t *cfg)
     /* Disable loopback in the tx direction */
     DEVICE_REG32_W (cfg->gblCtlBase + CPDMA_REG_EMU_CTL, CPDMA_REG_VAL_EMU_CTL_NO_LOOPBACK);
 
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
+    /* Set QM base address, only for K2x devices */
+    DEVICE_REG32_W (cfg->gblCtlBase + CPDMA_REG_QM_BASE_ADDR(0), DEVICE_QM1_QUEUE_MANAGEMENT_REGS(0));
+#endif
+
     /* Enable all channels. The current state isn't important */
     for (i = 0; i < cfg->nTxChans; i++)  {
         DEVICE_REG32_W (cfg->txBase + CPDMA_REG_TCHAN_CFG_REG_B(i), 0);  /* Priority */
index fed4b59cf3b921c1411acc7a1e565fdba305f495..0f3c362a34592bd9114577db9fc88054693cee20 100755 (executable)
@@ -71,7 +71,7 @@
 #pragma DATA_ALIGN(post_version, 16)
 char post_version[] = POST_VERSION;
 
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
 /*
  *  Holds the base address of ports.
  */
@@ -240,11 +240,24 @@ post_test_external_memory
 {
     POST_TEST_RESULT    test_result = POST_TEST_RESULT_PASSED;
 
-    if(platform_external_memory_test(0, 0) != Platform_EOK)
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
+    /* DDR3A test */
+    if(platform_external_memory_test(0x80000000, 0x88000000) != Platform_EOK)
     {
         test_result = POST_TEST_RESULT_FAILED;
     }
 
+    /* DDR3B test */
+    if(platform_external_memory_test(0x60000000, 0x68000000) != Platform_EOK)
+    {
+        test_result = POST_TEST_RESULT_FAILED;
+    }
+#else
+    if(platform_external_memory_test(0, 0) != Platform_EOK)
+    {
+        test_result = POST_TEST_RESULT_FAILED;
+    }
+#endif
     return test_result;
 }
 
@@ -474,7 +487,7 @@ int32_t Init_sgmii (uint32_t macPortNum)
         CSL_SGMII_endRxTxSoftReset (macPortNum);
 
            /* Wait for SGMII Link */
-        if (!cpswSimTest && ((cpswLpbkMode == CPSW_LOOPBACK_EXTERNAL) || (cpswLpbkMode == CPSW_LOOPBACK_NONE)))
+        if (!cpswSimTest)
         {
                do
                {
@@ -516,7 +529,7 @@ int Init_MAC (uint32_t macPortNum, uint8_t macAddress[6], uint32_t mtu)
     CSL_CPGMAC_SL_enableExtControl (macPortNum);
 
     /* Configure the MAC address for this port */
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
     CSL_CPSW_nGF_setPortMACAddress (macPortNum, macAddress);
 #else
     CSL_CPSW_3GF_setPortMACAddress (macPortNum, macAddress);
@@ -527,7 +540,7 @@ int Init_MAC (uint32_t macPortNum, uint8_t macAddress[6], uint32_t mtu)
      * For now, we are not using VLANs so just configure them
      * to all zeros.
      */
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
     CSL_CPSW_nGF_setPortVlanReg (macPortNum, 0, 0, 0);
 #else
     CSL_CPSW_3GF_setPortVlanReg (macPortNum, 0, 0, 0);
@@ -548,7 +561,7 @@ int Init_MAC (uint32_t macPortNum, uint8_t macAddress[6], uint32_t mtu)
 
 void Init_Switch (uint32_t mtu)
 {
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
     CSL_CPSW_5GF_PORTSTAT               portStatCfg;
 #else
     CSL_CPSW_3GF_PORTSTAT               portStatCfg;
@@ -557,7 +570,7 @@ void Init_Switch (uint32_t mtu)
     /* Enable the CPPI port, i.e., port 0 that does all
      * the data streaming in/out of EMAC.
      */
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
     CSL_CPSW_nGF_enablePort0 ();
     CSL_CPSW_nGF_disableVlanAware ();
     CSL_CPSW_nGF_setPort0VlanReg (0, 0, 0);
@@ -578,7 +591,7 @@ void Init_Switch (uint32_t mtu)
     portStatCfg.p0BStatEnable   =   1;
     portStatCfg.p1StatEnable    =   1;
     portStatCfg.p2StatEnable    =   1;
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
     CSL_CPSW_nGF_setPortStatsEnableReg (&portStatCfg);
 #else
     CSL_CPSW_3GF_setPortStatsEnableReg (&portStatCfg);
@@ -594,7 +607,7 @@ void Init_Switch (uint32_t mtu)
      *          properties for the switch, i.e., which
      *          ports to send the packets to.
      */
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
     CSL_CPSW_nGF_enableAle ();
     CSL_CPSW_nGF_clearAleTable ();
 
@@ -613,7 +626,7 @@ void Init_Switch (uint32_t mtu)
 #endif
 
     if(cpswLpbkMode != CPSW_LOOPBACK_NONE)
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
         CSL_CPSW_nGF_enableAleBypass();
 #else
         CSL_CPSW_3GF_enableAleBypass();
@@ -626,7 +639,7 @@ void Init_Switch (uint32_t mtu)
 int Switch_update_addr (uint32_t portNum, uint8_t macAddress[6], Uint16 add)
 {
     uint32_t                              i;
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
     CSL_CPSW_5GF_ALE_PORTCONTROL        alePortControlCfg;
     CSL_CPSW_5GF_ALE_UNICASTADDR_ENTRY  ucastAddrCfg;
 #else
@@ -642,7 +655,7 @@ int Switch_update_addr (uint32_t portNum, uint8_t macAddress[6], Uint16 add)
     alePortControlCfg.mcastLimit            =   0;
     alePortControlCfg.bcastLimit            =   0;
 
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
     CSL_CPSW_nGF_setAlePortControlReg (portNum, &alePortControlCfg);
 #else
     CSL_CPSW_3GF_setAlePortControlReg (portNum, &alePortControlCfg);
@@ -656,13 +669,13 @@ int Switch_update_addr (uint32_t portNum, uint8_t macAddress[6], Uint16 add)
         * matching received packet must be forwarded to.
         */
         /* Get the next free ALE entry to program */
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
         for (i = 0; i < CSL_CPSW_5GF_NUMALE_ENTRIES; i++)
 #else
         for (i = 0; i < CSL_CPSW_3GF_NUMALE_ENTRIES; i++)
 #endif
         {
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
             if (CSL_CPSW_nGF_getALEEntryType (i) == ALE_ENTRYTYPE_FREE)
 #else
             if (CSL_CPSW_3GF_getALEEntryType (i) == ALE_ENTRYTYPE_FREE)
@@ -672,7 +685,7 @@ int Switch_update_addr (uint32_t portNum, uint8_t macAddress[6], Uint16 add)
                 break;
             }
         }
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
         if (i == CSL_CPSW_5GF_NUMALE_ENTRIES)
 #else
         if (i == CSL_CPSW_3GF_NUMALE_ENTRIES)
@@ -691,7 +704,7 @@ int Switch_update_addr (uint32_t portNum, uint8_t macAddress[6], Uint16 add)
             ucastAddrCfg.portNumber     =      portNum;   // Add the ALE entry for this port
 
             /* Setup the ALE entry for this port's MAC address */
-#if (defined(DEVICE_K2K))
+#if (defined(DEVICE_K2K) || defined(DEVICE_K2H))
             CSL_CPSW_nGF_setAleUnicastAddrEntry (i, &ucastAddrCfg);
 #else
             CSL_CPSW_3GF_setAleUnicastAddrEntry (i, &ucastAddrCfg);
@@ -707,7 +720,7 @@ int32_t Init_SGMII_SERDES(void)
 {
     if (cpswSimTest)
     {
-#if (!defined(DEVICE_K2K))
+#if (!defined(DEVICE_K2K) && !defined(DEVICE_K2H))
 
            /* Unlock the chip configuration registers to allow SGMII SERDES registers to
            * be written */
@@ -844,9 +857,9 @@ post_test_emac_loopback
     {
         return POST_TEST_RESULT_FAILED;
     }
-    
+
     platform_delay(100);
-    
+
     /* Receive the loopback packet */
     if (ret = cpmac_drv_receive (&nDevice, test_buf) <= 0)
     {
@@ -1036,7 +1049,7 @@ post_dump_register_val
    post_hex_to_string(reg_val, 8, msg);
    msg[8] = ' ';
    msg[9] = 0;
-   post_write_uart(msg);   
+   post_write_uart(msg);
 }
 
 /******************************************************************************
@@ -1067,7 +1080,6 @@ main
     memset(&init_config, 0, sizeof(platform_init_config));
     memset(&init_flags, 0x01, sizeof(platform_init_flags));
 
-    init_flags.phy = 1;
     acc_fail = 0;
 
     /* Initialize the platform */
@@ -1115,7 +1127,7 @@ main
         post_write_uart("\r\n\r------------------------------------------");
         post_write_uart("\r\n\rSOC Information");
         post_hex_to_string(info.board_rev, 4, msg);
-        post_write_uart("\r\n\r\nFPGA Version: ");
+        post_write_uart("\r\n\r\nBMC Version: ");
         post_write_uart(msg);
 
         if (info.serial_nbr[0] != 0)
@@ -1155,6 +1167,7 @@ main
 
         /* Dump Additional Information */
          post_dump_register_val ((uint32_t)&platform_init_return_code, "\r\n\rPlatform init return code: 0x");
+#if (!defined(DEVICE_K2K) && !defined(DEVICE_K2H))
          post_write_uart("\r\n\rAdditional Information: ");
          post_dump_register_val (0x02350014, "\r\n\r   (0x02350014) :");
          post_dump_register_val (0x02350624, "\r\n\r   (0x02350624) :");
@@ -1180,6 +1193,7 @@ main
          post_dump_register_val (0x02620180, "\r\n\r   (0x02620180) :");
 
          post_write_uart("\r\n\r------------------------------------------");
+#endif
     }
 
     post_write_uart("\r\n\r\nPower On Self Test\n");
@@ -1238,6 +1252,8 @@ main
        post_write_uart("\r\n\r\nPOST result: FAIL");
     }
 
+#if (!defined(DEVICE_K2K) && !defined(DEVICE_K2H))
     post_write_serial_no();
+#endif
 }