changes to make ibl init endian neutral
authorSandeep Nair <a0875039@gt48xvq51.gt.design.ti.com>
Wed, 9 Mar 2011 19:31:58 +0000 (14:31 -0500)
committerSandeep Nair <a0875039@gt48xvq51.gt.design.ti.com>
Wed, 9 Mar 2011 19:31:58 +0000 (14:31 -0500)
release.sh
src/hw/i2c/i2c.c
src/hw/i2c/i2c.h
src/main/ibliniti2c.c
src/util/symExtract/symExtract

index 93d4b45632ce86d066e29a4273462e244a3acc08..dafa12c7b56da332cfe8baf1c8aa89423d78c655 100755 (executable)
@@ -1,6 +1,6 @@
 #!/bin/sh
 # Generate the source release tarballs
-export IBL_VERSION="0_5_2"
+export IBL_VERSION="1_0_1"
 cd ../
 if [ -f ibl_src_$IBL_VERSION.tar ]; then rm ibl_src_$IBL_VERSION.tar; fi
 
@@ -12,139 +12,118 @@ 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/be
-mkdir ibl_bin_$IBL_VERSION/c6455/le
+mkdir ibl_bin_$IBL_VERSION/c6455/le-be
 
 mkdir ibl_bin_$IBL_VERSION/c6472/
-mkdir ibl_bin_$IBL_VERSION/c6472/be
-mkdir ibl_bin_$IBL_VERSION/c6472/le
+mkdir ibl_bin_$IBL_VERSION/c6472/le-be
 
 mkdir ibl_bin_$IBL_VERSION/c6474/
 mkdir ibl_bin_$IBL_VERSION/c6474/be
 mkdir ibl_bin_$IBL_VERSION/c6474/le
 
-#mkdir ibl_bin_$IBL_VERSION/c6474l/
-#mkdir ibl_bin_$IBL_VERSION/c6474l/be
-#mkdir ibl_bin_$IBL_VERSION/c6474l/le
+mkdir ibl_bin_$IBL_VERSION/c6474l/
+mkdir ibl_bin_$IBL_VERSION/c6474l/be
+mkdir ibl_bin_$IBL_VERSION/c6474l/le
 
-#mkdir ibl_bin_$IBL_VERSION/c6457/
-#mkdir ibl_bin_$IBL_VERSION/c6457/be
-#mkdir ibl_bin_$IBL_VERSION/c6457/le
+mkdir ibl_bin_$IBL_VERSION/c6457/
+mkdir ibl_bin_$IBL_VERSION/c6457/be
+mkdir ibl_bin_$IBL_VERSION/c6457/le
 
+mkdir ibl_bin_$IBL_VERSION/c6678/
+mkdir ibl_bin_$IBL_VERSION/c6678/le
 
 # Set Build environment
-source setupenvLnx.sh
+source src/make/setupenvLnx.sh
 
-# Build C6455 LE
+# Build C6455 EVM
 pushd src/make
 make clean
-make c6455 ENDIAN=little
+make evm_c6455 I2C_MAP_ADDR=0x500
 popd
 # Copy the files to the Binary package
-cp -f src/make/ibl_c6455/i2crom_le.dat ibl_bin_$IBL_VERSION/c6455/le/
-cp -f src/util/i2cWrite/i2cWrite.out   ibl_bin_$IBL_VERSION/c6455/le/
-cp -f src/util/i2cConfig/i2cparam_c6455.out   ibl_bin_$IBL_VERSION/c6455/le/
+cp -f src/make/ibl_c6455/i2crom.dat ibl_bin_$IBL_VERSION/c6455/le-be/i2crom.dat
+cp -f src/util/i2cWrite/i2cWrite_le.out   ibl_bin_$IBL_VERSION/c6455/le-be/
+cp -f src/util/i2cConfig/i2cparam_c6455_le.out ibl_bin_$IBL_VERSION/c6455/le-be/i2cparam_c6455_le_0x500.out
 
-
-# Copy i2cConfig GEL file
-cp -f src/util/i2cConfig/i2cConfig.gel ibl_bin_$IBL_VERSION/i2cConfig.gel
-
-
-# Build C6455 BE
+# Build C6455 EVM BE
 pushd src/make
 make clean
-make c6455 ENDIAN=big
+make evm_c6455 I2C_MAP_ADDR=0x800
 popd
 # Copy the files to the Binary package
-cp -f src/make/ibl_c6455/i2crom_be.dat ibl_bin_$IBL_VERSION/c6455/be/
-cp -f src/util/i2cWrite/i2cWrite.out   ibl_bin_$IBL_VERSION/c6455/be/
-cp -f src/util/i2cConfig/i2cparam_c6455.out   ibl_bin_$IBL_VERSION/c6455/be/
+cp -f src/util/i2cConfig/i2cparam_c6455_be.out ibl_bin_$IBL_VERSION/c6455/le-be/i2cparam_c6455_be_0x800.out
+
+# Copy i2cConfig GEL file
+cp -f src/util/i2cConfig/i2cConfig.gel ibl_bin_$IBL_VERSION/i2cConfig.gel
 
 # Build C6472 le
 pushd src/make
 make clean
-make c6472 ENDIAN=little
+make evm_c6472 I2C_MAP_ADDR=0x500
 popd
 # Copy the files to the Binary package
-cp -f src/make/ibl_c6472/i2crom_le.dat ibl_bin_$IBL_VERSION/c6472/le/
-cp -f src/util/i2cWrite/i2cWrite.out   ibl_bin_$IBL_VERSION/c6472/le/
-cp -f src/util/i2cConfig/i2cparam_c6472.out   ibl_bin_$IBL_VERSION/c6472/le/
+cp -f src/make/ibl_c6472/i2crom.dat ibl_bin_$IBL_VERSION/c6472/le-be/i2crom.dat
+cp -f src/util/i2cWrite/i2cWrite_le.out   ibl_bin_$IBL_VERSION/c6472/le-be/
+cp -f src/util/i2cConfig/i2cparam_c6472_le.out ibl_bin_$IBL_VERSION/c6472/le-be/i2cparam_c6472_le_0x500.out
 
 
-# Build c6472 be
+# Build C6472 EVM BE
 pushd src/make
 make clean
-make c6472 ENDIAN=big
+make evm_c6472 I2C_MAP_ADDR=0x800
 popd
 # Copy the files to the Binary package
-cp -f src/make/ibl_c6472/i2crom_be.dat ibl_bin_$IBL_VERSION/c6472/be/
-cp -f src/util/i2cWrite/i2cWrite.out   ibl_bin_$IBL_VERSION/c6472/be/
-cp -f src/util/i2cConfig/i2cparam_c6472.out   ibl_bin_$IBL_VERSION/c6472/be/
+cp -f src/util/i2cConfig/i2cparam_c6472_be.out ibl_bin_$IBL_VERSION/c6472/le-be/i2cparam_c6472_be_0x800.out
 
-# Build c6474 le
+# Build c6474 EVM
 pushd src/make
 make clean
-make c6474 ENDIAN=little
+make evm_c6474 
 popd
 # Copy the files to the Binary package
-cp -f src/make/ibl_c6474/i2crom_le.dat ibl_bin_$IBL_VERSION/c6474/le/
-cp -f src/util/i2cWrite/i2cWrite.out   ibl_bin_$IBL_VERSION/c6474/le/
-cp -f src/util/i2cConfig/i2cparam_c6474.out   ibl_bin_$IBL_VERSION/c6474/le/
+cp -f src/make/ibl_c6474/i2crom_0x50_c6474_le.dat ibl_bin_$IBL_VERSION/c6474/le/
+cp -f src/make/ibl_c6474/i2crom_0x50_c6474_be.dat ibl_bin_$IBL_VERSION/c6474/be/
+cp -f src/util/i2cWrite/i2cWrite_le.out   ibl_bin_$IBL_VERSION/c6474/le/
+cp -f src/util/i2cWrite/i2cWrite_be.out   ibl_bin_$IBL_VERSION/c6474/be/
+cp -f src/util/i2cConfig/i2cparam_c6474_le.out   ibl_bin_$IBL_VERSION/c6474/le/
+cp -f src/util/i2cConfig/i2cparam_c6474_be.out   ibl_bin_$IBL_VERSION/c6474/be/
 
 
-# Build c6474 be
+# Build c6474l EVM
 pushd src/make
 make clean
-make c6474 ENDIAN=big
+make evm_c6474l
 popd
 # Copy the files to the Binary package
-cp -f src/make/ibl_c6474/i2crom_be.dat ibl_bin_$IBL_VERSION/c6474/be/
-cp -f src/util/i2cWrite/i2cWrite.out   ibl_bin_$IBL_VERSION/c6474/be/
-cp -f src/util/i2cConfig/i2cparam_c6474.out   ibl_bin_$IBL_VERSION/c6474/be/
-
-# Build c6474l le
-#pushd src/make
-#make clean
-#make c6474l ENDIAN=little
-#popd
-# Copy the files to the Binary package
-#cp -f src/make/ibl_c6474l/i2crom_le.dat ibl_bin_$IBL_VERSION/c6474l/le/
-#cp -f src/util/i2cWrite/i2cWrite.out   ibl_bin_$IBL_VERSION/c6474l/le/
-#cp -f src/util/i2cConfig/i2cparam_c6474l.out   ibl_bin_$IBL_VERSION/c6474l/le/
-
-
-# Build c6474l be
-#pushd src/make
-#make clean
-#make c6474l ENDIAN=big
-#popd
-# Copy the files to the Binary package
-#cp -f src/make/ibl_c6474l/i2crom_be.dat ibl_bin_$IBL_VERSION/c6474l/be/
-#cp -f src/util/i2cWrite/i2cWrite.out   ibl_bin_$IBL_VERSION/c6474l/be/
-#cp -f src/util/i2cConfig/i2cparam_c6474l.out   ibl_bin_$IBL_VERSION/c6474l/be/
-
-
-# Build c6457 le
-#pushd src/make
-#make clean
-#make c6457 ENDIAN=little
-#popd
-# Copy the files to the Binary package
-#cp -f src/make/ibl_c6457/i2crom_le.dat ibl_bin_$IBL_VERSION/c6457/le/
-#cp -f src/util/i2cWrite/i2cWrite.out   ibl_bin_$IBL_VERSION/c6457/le/
-#cp -f src/util/i2cConfig/i2cparam_c6457.out   ibl_bin_$IBL_VERSION/c6457/le/
+cp -f src/make/ibl_c6474/i2crom_0x50_c6474l_le.dat ibl_bin_$IBL_VERSION/c6474l/le/
+cp -f src/make/ibl_c6474/i2crom_0x50_c6474l_be.dat ibl_bin_$IBL_VERSION/c6474l/be/
+cp -f src/util/i2cWrite/i2cWrite_le.out   ibl_bin_$IBL_VERSION/c6474l/le/
+cp -f src/util/i2cWrite/i2cWrite_be.out   ibl_bin_$IBL_VERSION/c6474l/be/
+cp -f src/util/i2cConfig/i2cparam_c6474_le.out   ibl_bin_$IBL_VERSION/c6474l/le/
+cp -f src/util/i2cConfig/i2cparam_c6474_be.out   ibl_bin_$IBL_VERSION/c6474l/be/
 
 
-# Build c6457 be
-#pushd src/make
-#make clean
-#make c6457 ENDIAN=big
-#popd
-# Copy the files to the Binary package
-#cp -f src/make/ibl_c6457/i2crom_be.dat ibl_bin_$IBL_VERSION/c6457/be/
-#cp -f src/util/i2cWrite/i2cWrite.out   ibl_bin_$IBL_VERSION/c6457/be/
-#cp -f src/util/i2cConfig/i2cparam_c6457.out   ibl_bin_$IBL_VERSION/c6457/be/
+# Build c6457 EVM 
+pushd src/make
+make clean
+make evm_c6457 
+popd
+cp -f src/make/ibl_c6457/i2crom_0x50_c6457_le.dat ibl_bin_$IBL_VERSION/c6457/le/
+cp -f src/make/ibl_c6457/i2crom_0x50_c6457_be.dat ibl_bin_$IBL_VERSION/c6457/be/
+cp -f src/util/i2cWrite/i2cWrite_le.out   ibl_bin_$IBL_VERSION/c6457/le/
+cp -f src/util/i2cWrite/i2cWrite_be.out   ibl_bin_$IBL_VERSION/c6457/be/
+cp -f src/util/i2cConfig/i2cparam_c6457_le.out   ibl_bin_$IBL_VERSION/c6457/le/
+cp -f src/util/i2cConfig/i2cparam_c6457_be.out   ibl_bin_$IBL_VERSION/c6457/be/
+
+# Build c6678 EVM 
+pushd src/make
+make clean
+make evm_c6678_i2c ENDIAN=little I2C_BUS_ADDR=0x51 
+popd
+cp -f src/make/ibl_c661x/i2crom.dat ibl_bin_$IBL_VERSION/c6678/le/i2crom_0x51_c6678_le.dat
+cp -f src/util/i2cWrite/i2cWrite_le.out   ibl_bin_$IBL_VERSION/c6678/le/
+cp -f src/util/i2cConfig/i2cparam_c661x_le.out ibl_bin_$IBL_VERSION/c6678/le/i2cparam_c6678_le.out
 
 # Create Tar archive for binary package
-tar -cvf ibl_bin_$IBL_VERSION.tar ibl_bin_$IBL_VERSION
+tar -czf ibl_bin_$IBL_VERSION.tgz ibl_bin_$IBL_VERSION
 
index 2915f58e773e12d412ab2a6a38c7549b3ae8d510..e64e12dd34fdfff4fe77c2b55a6f2cd7652c648c 100644 (file)
@@ -159,7 +159,7 @@ void hwI2Cinit (UINT16 coreFreqMhz, UINT16 moduleDivisor, UINT16 clkFreqKhz, UIN
  *              of bytes. The byte stream arrives packed in the 16 bit
  *              data stream, and are sent most significant byte first.
  ****************************************************************************/
-I2C_RET hwI2cMasterWrite (UINT16 eeprom_i2c_id, UINT8 *eData, UINT16 nbytes, UINT16 endBusState, BOOL busIsMine)
+I2C_RET hwI2cMasterWrite (UINT32 eeprom_i2c_id, UINT8 *eData, UINT32 nbytes, UINT32 endBusState, BOOL busIsMine)
 {
   UINT32 timeoutCount;
   UINT32 polling;
@@ -303,8 +303,8 @@ I2C_RET hwI2cMasterRead (
   UINT32           byte_addr,
   UINT32           byte_len,
   UINT8           *p_packed_bytes,
-  UINT16           eeprom_i2c_id,
-  UINT16           address_delay)
+  UINT32           eeprom_i2c_id,
+  UINT32           address_delay)
 {
 
   UINT32  str;  
index 27581cdc6deee891f9489b1adc7ced288c713122..13b463f68719cd018de7a9ea9eebc2cf44251d0e 100644 (file)
@@ -69,8 +69,8 @@ enum {
 
 
 void hwI2Cinit (UINT16 coreFreqMhz, UINT16 moduleDivisor, UINT16 clkFreqKhz, UINT16 ownAddr);
-I2C_RET hwI2cMasterWrite (UINT16 eeprom_i2c_id, UINT8 *eData, UINT16 nbytes, UINT16 endBusState, BOOL busIsMine);
-I2C_RET hwI2cMasterRead (UINT32 byte_addr, UINT32 byte_len, UINT8 *p_packed_bytes, UINT16 eeprom_i2c_id, UINT16 address_delay);
+I2C_RET hwI2cMasterWrite (UINT32 eeprom_i2c_id, UINT8 *eData, UINT32 nbytes, UINT32 endBusState, BOOL busIsMine);
+I2C_RET hwI2cMasterRead (UINT32 byte_addr, UINT32 byte_len, UINT8 *p_packed_bytes, UINT32 eeprom_i2c_id, UINT32 address_delay);
 
 
 
index ab299b6902f64383f4c2e515f39f160cbfcf9a13..9d907125c0b89c50e1b56b66972dcdee72687484 100644 (file)
@@ -61,7 +61,7 @@ void i2cReadBlock (void)
     uint32 v;
 
     for (;;) {
-        while (hwI2cMasterRead (i2cReadAddress & 0xffff,    /* The address on the eeprom of the table */
+        while (hwI2cMasterRead (i2cReadAddress,             /* The address on the eeprom of the table */
                                 4,                          /* The number of bytes to read */
                                 iData,                      /* Where to store the bytes */
                                 i2cBusAddress,              /* The bus address of the eeprom */
@@ -80,7 +80,7 @@ void i2cReadBlock (void)
             continue;
 
 
-        while (hwI2cMasterRead (i2cReadAddress & 0xffff,    /* The address on the eeprom of the table */
+        while (hwI2cMasterRead (i2cReadAddress,             /* The address on the eeprom of the table */
                                 len,                        /* The number of bytes to read */
                                 iData,                      /* Where to store the bytes */
                                 i2cBusAddress,              /* The bus address of the eeprom */
index 6cd00fa61d7ff1686c89c1069d804f061a8a66ad..2645f80aead6cebe48e02f541e1faff209f6376b 100644 (file)
@@ -5,7 +5,6 @@
 #  usage:  symExtract <input file> <output file> symbol1 [symbol2 ...]
 #
 
-
 if [ $# -lt 3 ]; then
  echo usage: $0 \<input file\> \<output file\> symbol1 \[symbol2 ...\]
  exit
@@ -17,7 +16,6 @@ rm -f $2
 
 echo "/* File autogenerated by symExtract during build process. Do not edit */" > $2
 
-
 carg=2
 while [ $carg -lt $# ]; do
  symbol=`cat $1 | sed -n /${args[$carg]}\$/p | sed -n 1p`
@@ -27,6 +25,3 @@ while [ $carg -lt $# ]; do
  let carg=carg+1
 done
 
-
-
-