Fixes for Big endian mode on C6472
authorSandeep Nair <a0875039@gt48xvq51.gt.design.ti.com>
Tue, 22 Mar 2011 16:11:33 +0000 (12:11 -0400)
committerSandeep Nair <a0875039@gt48xvq51.gt.design.ti.com>
Tue, 22 Mar 2011 16:11:33 +0000 (12:11 -0400)
doc/release_info.txt
release.sh
src/main/iblinit.c
src/main/ibliniti2c.c
src/make/setupenvLnx.sh

index 66339ff02e55e4201a9d080d2268f38c42a3b6d3..5cb8cca2a2ac7595c04fb24ad0cc00f80c052029 100644 (file)
@@ -9,11 +9,16 @@ March 2011
     - C6472
     - C6474
     - C661x
+
 2) Supported ENDIAN
     - big
     - little
+
 3) Required toolset
     - TI CGEN compiler CGT_C6000_7.2.0
+NOTE: TI CGEN compiler CGT_C6000_6.1.12 has to be used for building IBL with
+ENDIAN mode "both".
 4) Build Instructions
 
     - Change directory to ibl\src\make
index 6e0850bd71680390360004be7d4741addd089bba..215f8401d367cc3820b3f9f188936ec554d8364c 100755 (executable)
@@ -2,9 +2,9 @@
 # Generate the source release tarballs
 export IBL_VERSION="1_0_0_1"
 cd ../
-if [ -f ibl_src_$IBL_VERSION.tar ]; then rm ibl_src_$IBL_VERSION.tar; fi
+if [ -f ibl_src_$IBL_VERSION.tgz ]; then rm ibl_src_$IBL_VERSION.tgz; fi
 
-tar -cvf ibl_src_$IBL_VERSION.tar ibl/src ibl/doc
+tar -czf ibl_src_$IBL_VERSION.tgz ibl/src ibl/doc
 
 cd ibl
 # Create directories for binary builds
@@ -12,12 +12,10 @@ if [ -d ibl_bin_$IBL_VERSION ]; then rm -r ibl_bin_$IBL_VERSION; fi
 
 mkdir ibl_bin_$IBL_VERSION
 mkdir ibl_bin_$IBL_VERSION/c6455/
-mkdir ibl_bin_$IBL_VERSION/c6455/le
-mkdir ibl_bin_$IBL_VERSION/c6455/be
+mkdir ibl_bin_$IBL_VERSION/c6455/le-be
 
 mkdir ibl_bin_$IBL_VERSION/c6472/
-mkdir ibl_bin_$IBL_VERSION/c6472/le
-mkdir ibl_bin_$IBL_VERSION/c6472/be
+mkdir ibl_bin_$IBL_VERSION/c6472/le-be
 
 mkdir ibl_bin_$IBL_VERSION/c6474/
 mkdir ibl_bin_$IBL_VERSION/c6474/be
@@ -43,44 +41,39 @@ source src/make/setupenvLnx.sh
 # Build C6455 EVM
 pushd src/make
 make clean
-make c6455 I2C_BUS_ADDR=0x50 I2C_MAP_ADDR=0x500 COMPACT_I2C=no ENDIAN=little 
+make evm_c6455 I2C_MAP_ADDR=0x500
 popd
 # Copy the files to the Binary package
-cp -f src/make/ibl_c6455/i2crom.dat ibl_bin_$IBL_VERSION/c6455/le/i2crom_0x50_c6455_le.dat
-cp -f src/util/i2cWrite/i2cWrite_le.out ibl_bin_$IBL_VERSION/c6455/le/i2cWrite_c6455_le.out
-cp -f src/util/i2cConfig/i2cparam_c6455_le.out ibl_bin_$IBL_VERSION/c6455/le/i2cparam_c6455_le_0x500.out
+cp -f src/make/ibl_c6455/i2crom.dat ibl_bin_$IBL_VERSION/c6455/le-be/i2crom_0x50_c6455.dat
+cp -f src/util/i2cWrite/i2cWrite_le.out ibl_bin_$IBL_VERSION/c6455/le-be/i2cWrite_c6455_le.out
+cp -f src/util/i2cConfig/i2cparam_c6455_le.out ibl_bin_$IBL_VERSION/c6455/le-be/i2cparam_c6455_le_0x500.out
 
 # Build C6455 EVM BE
 pushd src/make
 make clean
-make c6455 I2C_BUS_ADDR=0x50 I2C_MAP_ADDR=0x800 COMPACT_I2C=no ENDIAN=big 
+make evm_c6455 I2C_MAP_ADDR=0x800
 popd
 # Copy the files to the Binary package
-cp -f src/make/ibl_c6455/i2crom.dat ibl_bin_$IBL_VERSION/c6455/be/i2crom_0x50_c6455_be.dat
-cp -f src/util/i2cWrite/i2cWrite_be.out ibl_bin_$IBL_VERSION/c6455/be/i2cWrite_c6455_be.out
-cp -f src/util/i2cConfig/i2cparam_c6455_be.out ibl_bin_$IBL_VERSION/c6455/be/i2cparam_c6455_be_0x800.out
+cp -f src/util/i2cConfig/i2cparam_c6455_le.out ibl_bin_$IBL_VERSION/c6455/le-be/i2cparam_c6455_le_0x800.out
 
 
 # Build C6472 le
 pushd src/make
 make clean
-make c6472 I2C_BUS_ADDR=0x50 I2C_MAP_ADDR=0x500 COMPACT_I2C=no ENDIAN=little 
+make evm_c6472 I2C_MAP_ADDR=0x500
 popd
 # Copy the files to the Binary package
-cp -f src/make/ibl_c6472/i2crom.dat ibl_bin_$IBL_VERSION/c6472/le/i2crom_0x50_c6472_le.dat
-cp -f src/util/i2cWrite/i2cWrite_le.out   ibl_bin_$IBL_VERSION/c6472/le/i2Write_c6472_le.out
+cp -f src/make/ibl_c6472/i2crom.dat ibl_bin_$IBL_VERSION/c6472/le-be/i2crom_0x50_c6472.dat
+cp -f src/util/i2cWrite/i2cWrite_le.out   ibl_bin_$IBL_VERSION/c6472/le-be/i2Write_c6472_le.out
 cp -f src/util/i2cConfig/i2cparam_c6472_le.out ibl_bin_$IBL_VERSION/c6472/le-be/i2cparam_c6472_le_0x500.out
 
-
 # Build C6472 EVM BE
 pushd src/make
 make clean
-make c6472 I2C_BUS_ADDR=0x50 I2C_MAP_ADDR=0x800 COMPACT_I2C=no ENDIAN=big 
+make evm_c6472 I2C_MAP_ADDR=0x800
 popd
 # Copy the files to the Binary package
-cp -f src/make/ibl_c6472/i2crom.dat ibl_bin_$IBL_VERSION/c6472/be/i2crom_0x50_c6472_be.dat
-cp -f src/util/i2cWrite/i2cWrite_be.out   ibl_bin_$IBL_VERSION/c6472/be/i2Write_c6472_be.out
-cp -f src/util/i2cConfig/i2cparam_c6472_be.out ibl_bin_$IBL_VERSION/c6472/be/i2cparam_c6472_be_0x800.out
+cp -f src/util/i2cConfig/i2cparam_c6472_le.out ibl_bin_$IBL_VERSION/c6472/le-be/i2cparam_c6472_le_0x800.out
 
 # Build c6474 EVM
 pushd src/make
index 5b5642f300df5ee56235c6dc00375d620ed975dc..23ab6f0b2b6f6d77858973b9af463ab155f2aa2e 100644 (file)
@@ -241,7 +241,7 @@ void iblSwap (void)
 
 
     for (i = 0; i < ibl_N_ETH_PORTS; i++)  {
-        ibl.sgmiiConfig[i].configure     = swap32val(ibl.sgmiiConfig[i].configure);
+        ibl.sgmiiConfig[i].configure     = swap16val(ibl.sgmiiConfig[i].configure);
         ibl.sgmiiConfig[i].adviseAbility = swap32val(ibl.sgmiiConfig[i].adviseAbility);
         ibl.sgmiiConfig[i].control       = swap32val(ibl.sgmiiConfig[i].control);
         ibl.sgmiiConfig[i].txConfig      = swap32val(ibl.sgmiiConfig[i].txConfig);
@@ -268,7 +268,7 @@ void iblSwap (void)
     for (i = 0; i < ibl_MAX_EMIF_PMEM; i++)  {
         ibl.emifConfig[i].csSpace    = swap16val(ibl.emifConfig[i].csSpace);
         ibl.emifConfig[i].busWidth   = swap16val(ibl.emifConfig[i].busWidth);
-        ibl.emifConfig[i].waitEnable = swap32val(ibl.emifConfig[i].waitEnable);
+        ibl.emifConfig[i].waitEnable = swap16val(ibl.emifConfig[i].waitEnable);
     }
 
 
@@ -278,9 +278,9 @@ void iblSwap (void)
         ibl.bootModes[i].port     = swap32val(ibl.bootModes[i].port);
 
         if (ibl.bootModes[i].bootMode == ibl_BOOT_MODE_TFTP)  {
-            ibl.bootModes[i].u.ethBoot.doBootp            = swap32val(ibl.bootModes[i].u.ethBoot.doBootp);
-            ibl.bootModes[i].u.ethBoot.useBootpServerIp   = swap32val(ibl.bootModes[i].u.ethBoot.useBootpServerIp);
-            ibl.bootModes[i].u.ethBoot.useBootpFileName   = swap32val(ibl.bootModes[i].u.ethBoot.useBootpFileName);
+            ibl.bootModes[i].u.ethBoot.doBootp            = swap16val(ibl.bootModes[i].u.ethBoot.doBootp);
+            ibl.bootModes[i].u.ethBoot.useBootpServerIp   = swap16val(ibl.bootModes[i].u.ethBoot.useBootpServerIp);
+            ibl.bootModes[i].u.ethBoot.useBootpFileName   = swap16val(ibl.bootModes[i].u.ethBoot.useBootpFileName);
             ibl.bootModes[i].u.ethBoot.bootFormat         = swap32val(ibl.bootModes[i].u.ethBoot.bootFormat);
             ibl.bootModes[i].u.ethBoot.blob.startAddress  = swap32val(ibl.bootModes[i].u.ethBoot.blob.startAddress);
             ibl.bootModes[i].u.ethBoot.blob.sizeBytes     = swap32val(ibl.bootModes[i].u.ethBoot.blob.sizeBytes);
@@ -299,7 +299,7 @@ void iblSwap (void)
             ibl.bootModes[i].u.nandBoot.nandInfo.pagesPerBlock = swap32val(ibl.bootModes[i].u.nandBoot.nandInfo.pagesPerBlock);
             ibl.bootModes[i].u.nandBoot.nandInfo.totalBlocks   = swap32val(ibl.bootModes[i].u.nandBoot.nandInfo.totalBlocks);
             ibl.bootModes[i].u.nandBoot.nandInfo.addressBytes  = swap32val(ibl.bootModes[i].u.nandBoot.nandInfo.addressBytes);
-            ibl.bootModes[i].u.nandBoot.nandInfo.lsbFirst      = swap32val(ibl.bootModes[i].u.nandBoot.nandInfo.lsbFirst);
+            ibl.bootModes[i].u.nandBoot.nandInfo.lsbFirst      = swap16val(ibl.bootModes[i].u.nandBoot.nandInfo.lsbFirst);
             ibl.bootModes[i].u.nandBoot.nandInfo.blockOffset   = swap32val(ibl.bootModes[i].u.nandBoot.nandInfo.blockOffset);
             ibl.bootModes[i].u.nandBoot.nandInfo.pageOffset    = swap32val(ibl.bootModes[i].u.nandBoot.nandInfo.pageOffset);
             ibl.bootModes[i].u.nandBoot.nandInfo.columnOffset  = swap32val(ibl.bootModes[i].u.nandBoot.nandInfo.columnOffset);
index 9d907125c0b89c50e1b56b66972dcdee72687484..0a3db3a7a06998b15771a2816c2cb39aaf6673f7 100644 (file)
@@ -107,6 +107,7 @@ void i2cReadBlock (void)
 
 
     i2cReadAddress += len;
+    i2cBusAddress = i2cReadAddress >>16;
     
     iFifoIn  = len;
     iFifoOut = 4;    /* The i2c header is effectively removed */
index 4bd2fd24f4fa4948b71b827eb1d2b3185df2916a..e2e47d4e45676a91350ad6ccf737238d715bb3fb 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 export OS="Linux"
-export C6X_BASE_DIR=/apps/ti/cgt/c6000_6.1.5/
-export PATH=/apps/ti/cgt/c6000_6.1.5/bin:$PATH
-export TOOLSC6X=/apps/ti/cgt/c6000_6.1.5
-export TOOLSC6XDOS=/apps/ti/cgt/c6000_6.1.5
-export TOOLSBIOSC6XDOS=/apps/ti/cgt/c6000_6.1.5
+export C6X_BASE_DIR=/apps/ti/cgt/TI_CGT_C6000_6.1.12
+export PATH=$C6X_BASE_DIR/bin:$PATH
+export TOOLSC6X=$C6X_BASE_DIR
+export TOOLSC6XDOS=$C6X_BASE_DIR
+export TOOLSBIOSC6XDOS=$C6X_BASE_DIR