Code review updates
authorMike Line <m-line1@ti.com>
Mon, 22 Nov 2010 20:14:16 +0000 (15:14 -0500)
committerMike Line <m-line1@ti.com>
Mon, 22 Nov 2010 20:14:16 +0000 (15:14 -0500)
Removed some warning, added a version number, removed unused files.

54 files changed:
src/cfg/c6455/iblcfg.h
src/cfg/c6457/iblcfg.h
src/cfg/c6472/iblcfg.h
src/cfg/c6474/iblcfg.h
src/device/c6455/target.h
src/device/c6457/c6457.c
src/device/c6457/c6457init.c [new file with mode: 0644]
src/device/c6457/target.h
src/device/c6472/target.h
src/device/c6474/target.h
src/device/c6474l/c6474l.c [deleted file]
src/device/c6474l/target.h [deleted file]
src/driver/eth/netif.h
src/hw/nands/gpio/nandgpio.c
src/hw/nands/gpio/nandwrgpio.c
src/ibl.h
src/interp/btbl/btblwrap.h
src/interp/coff/cload.c
src/interp/coff/cload_main.c [deleted file]
src/interp/elf/dload.c
src/main/c64x/make/makefile
src/main/iblinit.c
src/main/iblmain.c
src/make/Makefile
src/make/ibl_c6455/i2crom.map.pre
src/make/ibl_c6455/i2crom_be.map [deleted file]
src/make/ibl_c6455/i2crom_le.map [deleted file]
src/make/ibl_c6455/ibl_objs_template.inc
src/make/ibl_c6457/i2crom.map.pre [new file with mode: 0644]
src/make/ibl_c6457/i2crom_le.map [deleted file]
src/make/ibl_c6457/ibl.cmd
src/make/ibl_c6457/ibl_common.inc [new file with mode: 0644]
src/make/ibl_c6457/ibl_init.cmd [new file with mode: 0644]
src/make/ibl_c6457/ibl_init.rmd [moved from src/make/ibl_c6474l/ibl.rmd with 100% similarity, mode: 0644]
src/make/ibl_c6457/ibl_init_image.rmd [new file with mode: 0644]
src/make/ibl_c6457/ibl_init_objs_template.inc [new file with mode: 0644]
src/make/ibl_c6457/ibl_objs_template.inc [new file with mode: 0644]
src/make/ibl_c6472/i2crom.map.pre
src/make/ibl_c6472/i2crom_be.map [deleted file]
src/make/ibl_c6472/i2crom_le.map [deleted file]
src/make/ibl_c6474/i2crom.map.pre
src/make/ibl_c6474/i2crom_be.map [deleted file]
src/make/ibl_c6474/i2crom_le.map [deleted file]
src/make/ibl_c6474/ibl.cmd
src/make/ibl_c6474l/i2crom_be.map [deleted file]
src/make/ibl_c6474l/i2crom_le.map [deleted file]
src/make/ibl_c6474l/ibl.cmd [deleted file]
src/make/makestg1
src/make/makestg2
src/nandboot/nandboot.h [moved from src/cfg/c6474l/iblcfg.h with 50% similarity]
src/util/i2cConfig/i2cparam.c
src/util/i2cWrite/Makefile
src/util/i2cWrite/i2cWrite.c
src/util/i2cWrite/makestg2

index b60b8344c7a313ca866b8edd733319a9ca3a64f1..b165d003c80a8e2aa1ecb103e35c1c3b6ae80cc9 100644 (file)
 /**
  * @brief The I2C bus address and data address of the ibl table.
  */
-#define IBL_I2C_DEV_FREQ_MHZ            1000
-#define IBL_I2C_CLK_FREQ_KHZ            100
-#define IBL_I2C_OWN_ADDR                10
-#define IBL_I2C_CFG_ADDR_DELAY          0x100       /* Delay between sending the address and reading data */
+#define IBL_CFG_I2C_DEV_FREQ_MHZ            1000
+#define IBL_CFG_I2C_CLK_FREQ_KHZ            100
+#define IBL_CFG_I2C_OWN_ADDR                10
+#define IBL_CFG_I2C_ADDR_DELAY              0x100       /* Delay between sending the address and reading data */
 
 /**
  *  @brief The default location for the i2c map information can be overridden during make
  */
-#ifndef IBL_I2C_MAP_TABLE_DATA_BUS_ADDR
- #define IBL_I2C_MAP_TABLE_DATA_BUS_ADDR 0x50
+#ifndef IBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR
+ #define IBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR 0x50
 #endif
 
 
-#ifndef IBL_I2C_MAP_TABLE_DATA_ADDR
- #define IBL_I2C_MAP_TABLE_DATA_ADDR     0x400
+#ifndef IBL_CFG_I2C_MAP_TABLE_DATA_ADDR
+ #define IBL_CFG_I2C_MAP_TABLE_DATA_ADDR     0x400
 #endif
  
 
+/**
+ *  @brief
+ *    GPIO pin mapping 
+ */
+#define NAND_CLE_GPIO_PIN      GPIO_8     // High: Command Cycle occuring
+#define NAND_ALE_GPIO_PIN      GPIO_9     // High: Address input cycle oddcuring
+#define NAND_NWE_GPIO_PIN      GPIO_10
+#define NAND_NRE_GPIO_PIN      GPIO_12
+#define NAND_NCE_GPIO_PIN      GPIO_13
+#define NAND_MODE_GPIO         GPIO_14
+
+/**
+ *  @brief
+ *      The standard NAND delay must be big enough to handle the highest possible
+ *      operating frequency of the device */
+#define TARGET_NAND_STD_DELAY                          25 // In cpu cycles
 
 
 
index 543600b8393b0cffa1ee88e4768fe9b7d7342e52..88592c86baabf80bdb54af83a2338534999c2b50 100644 (file)
 /**
  * @brief The I2C bus address and data address of the ibl table.
  */
-#define IBL_I2C_DEV_FREQ_MHZ            1000
-#define IBL_I2C_CLK_FREQ_KHZ            100
-#define IBL_I2C_OWN_ADDR                10
-#define IBL_I2C_CFG_ADDR_DELAY          0x100       /* Delay between sending the address and reading data */
+#define IBL_CFG_I2C_DEV_FREQ_MHZ            1000
+#define IBL_CFG_I2C_CLK_FREQ_KHZ            100
+#define IBL_CFG_I2C_OWN_ADDR                10
+#define IBL_CFG_I2C_ADDR_DELAY              0x100       /* Delay between sending the address and reading data */
 
-#ifndef IBL_I2C_CFG_EEPROM_BUS_ADDR
- #define IBL_I2C_CFG_EEPROM_BUS_ADDR    0x50
+/**
+ *  @brief The default location for the i2c map information can be overridden during make
+ */
+#ifndef IBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR
+ #define IBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR 0x50
 #endif
 
-#define IBL_I2C_CFG_TABLE_DATA_ADDR     (0x10000 - 0x300)
 
+#ifndef IBL_CFG_I2C_MAP_TABLE_DATA_ADDR
+ #define IBL_CFG_I2C_MAP_TABLE_DATA_ADDR     0x100
+#endif
 /**
- * @brief No NAND support. Define the function call to be a void statement
+ *  @brief
+ *    GPIO pin mapping 
  */
-#define iblNandBoot()
+#define NAND_CLE_GPIO_PIN      GPIO_8     // High: Command Cycle occuring
+#define NAND_ALE_GPIO_PIN      GPIO_9     // High: Address input cycle oddcuring
+#define NAND_NWE_GPIO_PIN      GPIO_10
+#define NAND_NRE_GPIO_PIN      GPIO_12
+#define NAND_NCE_GPIO_PIN      GPIO_13
+#define NAND_MODE_GPIO         GPIO_14
 
 /**
- * @brief No Elf support
- */
-#define iblIsElf(x)         FALSE
-#define iblBootElf(x,y)     for (;;);
+ *  @brief
+ *      The standard NAND delay must be big enough to handle the highest possible
+ *      operating frequency of the device */
+#define TARGET_NAND_STD_DELAY                          25 // In cpu cycles
 
 
 #endif
index b8ab70909b14d550b2aab2735dc45dd3b8dc5efb..4cf552a8e3a110e091e0f5c9cce622c41518167c 100644 (file)
  * @brief Estimates of operating parameters. Actual values will be known once they are
  *        read from the i2c.
  */
-#define IBL_I2C_DEV_FREQ_MHZ            625
-#define IBL_I2C_CLK_FREQ_KHZ            100
-#define IBL_I2C_OWN_ADDR                10
-#define IBL_I2C_CFG_ADDR_DELAY          0x100       /* Delay between sending the address and reading data */
+#define IBL_CFG_I2C_DEV_FREQ_MHZ            625
+#define IBL_CFG_I2C_CLK_FREQ_KHZ            100
+#define IBL_CFG_I2C_OWN_ADDR                10
+#define IBL_CFG_I2C_ADDR_DELAY              0x100       /* Delay between sending the address and reading data */
 
 
 /**
  *  @brief The default location for the i2c map information can be overridden during make
  */
-#ifndef IBL_I2C_MAP_TABLE_DATA_BUS_ADDR
- #define IBL_I2C_MAP_TABLE_DATA_BUS_ADDR 0x50
+#ifndef IBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR
+ #define IBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR 0x50
 #endif
 
 
-#ifndef IBL_I2C_MAP_TABLE_DATA_ADDR
- #define IBL_I2C_MAP_TABLE_DATA_ADDR     0x420
+#ifndef IBL_CFG_I2C_MAP_TABLE_DATA_ADDR
+ #define IBL_CFG_I2C_MAP_TABLE_DATA_ADDR     0x420
 #endif
  
 
+/**
+ *  @brief
+ *    GPIO pin mapping for NAND
+ */
+#define NAND_CLE_GPIO_PIN      GPIO_8     // High: Command Cycle occuring
+#define NAND_ALE_GPIO_PIN      GPIO_9     // High: Address input cycle oddcuring
+#define NAND_NWE_GPIO_PIN      GPIO_10
+#define NAND_NRE_GPIO_PIN      GPIO_12
+#define NAND_NCE_GPIO_PIN      GPIO_13
+#define NAND_MODE_GPIO         GPIO_14
+
+/**
+ *  @brief
+ *      The standard NAND delay must be big enough to handle the highest possible
+ *      operating frequency of the device */
+#define TARGET_NAND_STD_DELAY                          25 // In cpu cycles
+
 
 
 #endif
index 8961085368eb9ff590282c12f345a4f3e357a84f..7b17be32bef389adc8499f58bd56c928269e3e99 100755 (executable)
 /**
  * @brief The I2C bus address and data address of the ibl table.
  */
-#define IBL_I2C_DEV_FREQ_MHZ            1000
-#define IBL_I2C_CLK_FREQ_KHZ            100
-#define IBL_I2C_OWN_ADDR                10
-#define IBL_I2C_CFG_ADDR_DELAY          0x100       /* Delay between sending the address and reading data */
+#define IBL_CFG_I2C_DEV_FREQ_MHZ            1000
+#define IBL_CFG_I2C_CLK_FREQ_KHZ            100
+#define IBL_CFG_I2C_OWN_ADDR                10
+#define IBL_CFG_I2C_ADDR_DELAY              0x100       /* Delay between sending the address and reading data */
 
 /**
  *  @brief The default location for the i2c map information can be overridden during make
  */
-#ifndef IBL_I2C_MAP_TABLE_DATA_BUS_ADDR
- #define IBL_I2C_MAP_TABLE_DATA_BUS_ADDR 0x50
+#ifndef IBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR
+ #define IBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR 0x50
 #endif
 
-#ifndef IBL_I2C_MAP_TABLE_DATA_ADDR
- #define IBL_I2C_MAP_TABLE_DATA_ADDR     0x100
+#ifndef IBL_CFG_I2C_MAP_TABLE_DATA_ADDR
+ #define IBL_CFG_I2C_MAP_TABLE_DATA_ADDR     0x100
 #endif
  
+/**
+ *  @brief
+ *    GPIO pin mapping 
+ */
+#define NAND_CLE_GPIO_PIN      GPIO_8     // High: Command Cycle occuring
+#define NAND_ALE_GPIO_PIN      GPIO_9     // High: Address input cycle oddcuring
+#define NAND_NWE_GPIO_PIN      GPIO_10
+#define NAND_NRE_GPIO_PIN      GPIO_12
+#define NAND_NCE_GPIO_PIN      GPIO_13
+#define NAND_MODE_GPIO         GPIO_14
 
+/**
+ *  @brief
+ *      The standard NAND delay must be big enough to handle the highest possible
+ *      operating frequency of the device */
+#define TARGET_NAND_STD_DELAY                          25 // In cpu cycles
 
 #endif
 
 
index 464c803910517288fd10d4e6b878603b368b2394..34db4eb9685d2a78b0e699e0405d55b54156a64b 100644 (file)
 #define GPIO_SET_FAL_TRIG_REG  0x02B0002C
 #define GPIO_CLR_FAL_TRIG_REG  0x02B00030
 
-/**
- *  @brief
- *    GPIO pin mapping 
- */
-#define NAND_CLE_GPIO_PIN      GPIO_8     // High: Command Cycle occuring
-#define NAND_ALE_GPIO_PIN      GPIO_9     // High: Address input cycle oddcuring
-#define NAND_NWE_GPIO_PIN      GPIO_10
-#define NAND_NRE_GPIO_PIN      GPIO_12
-#define NAND_NCE_GPIO_PIN      GPIO_13
-#define NAND_MODE_GPIO         GPIO_14
-
-/**
- *  @brief
- *      The standard NAND delay must be big enough to handle the highest possible
- *      operating frequency of the device */
-#define TARGET_NAND_STD_DELAY                          25 // In cpu cycles
 
 /**
  *  @brief
index 01bf8d4fe2e5f2064dbd8ebe0437024e5654f81f..ef06ed32f4a857402ec9ba129d02de61145e29da 100644 (file)
@@ -102,24 +102,6 @@ Uint32 deviceLocalAddrToGlobal (Uint32 addr)
 }
         
         
-/**
- * @brief Configure the PLLs
- *
- * @details
- *   Only the main PLL can be configured here. The DDR pll is enabled by default,
- *   and the network PLL is enabled through serdes configuration.
- *   the multiplier and dividers.
- */
-void devicePllConfig (void)
-{
-    if (ibl.pllConfig[ibl_MAIN_PLL].doEnable == TRUE)
-        hwPllSetPll (MAIN_PLL, 
-                     ibl.pllConfig[ibl_MAIN_PLL].prediv,
-                     ibl.pllConfig[ibl_MAIN_PLL].mult,
-                     ibl.pllConfig[ibl_MAIN_PLL].postdiv);
-
-}
-
 /**
  * @brief
  *   Enable the DDR
@@ -163,7 +145,7 @@ int32 devicePowerPeriph (int32 modNum)
  *  @details  On the evm the nand controller is enabled by setting 
  *            gpio 14 high
  */
-#if 0
+#ifndef EXCLUDE_NAND
 int32 deviceConfigureForNand(void)
 {
        hwGpioSetDirection(NAND_MODE_GPIO, GPIO_OUT);
diff --git a/src/device/c6457/c6457init.c b/src/device/c6457/c6457init.c
new file mode 100644 (file)
index 0000000..bc6879d
--- /dev/null
@@ -0,0 +1,47 @@
+/**
+ * @file c6457init.c
+ *
+ * @brief
+ *     c6457 functions used during the initial stage of the ibl load
+ */
+#include "ibl.h"
+#include "device.h"
+#include "pllapi.h"
+
+/**
+ * @brief Configure the PLLs
+ *
+ * @details
+ *   Only the main PLL can be configured here. The DDR pll is enabled by default,
+ *   and the network PLL is enabled through serdes configuration.
+ *   the multiplier and dividers.
+ */
+void devicePllConfig (void)
+{
+    if (ibl.pllConfig[ibl_MAIN_PLL].doEnable == TRUE)
+        hwPllSetPll (MAIN_PLL, 
+                     ibl.pllConfig[ibl_MAIN_PLL].prediv,
+                     ibl.pllConfig[ibl_MAIN_PLL].mult,
+                     ibl.pllConfig[ibl_MAIN_PLL].postdiv);
+
+}
+
+
+
+/**
+ * @brief
+ *  Return the endian status of the device
+ *
+ * @details
+ *  Returns true if the device is executing in little endian mode
+ */
+extern cregister volatile unsigned int CSR;
+
+bool deviceIsLittleEndian (void)
+{
+    if ((CSR & (1 << 8)) == 0)    
+        return (FALSE);
+
+    return (TRUE);
+
+}
index 768ed8190f32fe2018a40e062e3a3953b7df2e33..5988bb042d61da2bb2cb55da663f21ab9be9b47f 100644 (file)
 #define GPIO_SET_FAL_TRIG_REG  0x02B0002C
 #define GPIO_CLR_FAL_TRIG_REG  0x02B00030
 
-/**
- *  @brief
- *    GPIO pin mapping 
- */
-#define NAND_CLE_GPIO_PIN      GPIO_8     // High: Command Cycle occuring
-#define NAND_ALE_GPIO_PIN      GPIO_9     // High: Address input cycle oddcuring
-#define NAND_NWE_GPIO_PIN      GPIO_10
-#define NAND_NRE_GPIO_PIN      GPIO_12
-#define NAND_NCE_GPIO_PIN      GPIO_13
-#define NAND_MODE_GPIO         GPIO_14
-
-/**
- *  @brief
- *      The standard NAND delay must be big enough to handle the highest possible
- *      operating frequency of the device */
-#define TARGET_NAND_STD_DELAY                          25 // In cpu cycles
 
 /**
  *  @brief
index d8784858cf6535386626d254ff336809c678d494..5b86007a042833913a075e1b97b62731da21a6f5 100644 (file)
 #define GPIO_SET_FAL_TRIG_REG  0x02B0002C
 #define GPIO_CLR_FAL_TRIG_REG  0x02B00030
 
-/**
- *  @brief
- *    GPIO pin mapping 
- */
-#define NAND_CLE_GPIO_PIN      GPIO_8     // High: Command Cycle occuring
-#define NAND_ALE_GPIO_PIN      GPIO_9     // High: Address input cycle oddcuring
-#define NAND_NWE_GPIO_PIN      GPIO_10
-#define NAND_NRE_GPIO_PIN      GPIO_12
-#define NAND_NCE_GPIO_PIN      GPIO_13
-#define NAND_MODE_GPIO         GPIO_14
-
-/**
- *  @brief
- *      The standard NAND delay must be big enough to handle the highest possible
- *      operating frequency of the device */
-#define TARGET_NAND_STD_DELAY                          25 // In cpu cycles
-
 /**
  *  @brief
  *      The base address of the I2C peripheral, and the module divisor of the cpu clock
index 6e67259855fff91d57fd00320a37b9f3048a57d0..e1612b62e02bf2aa66a8836c52183d78c7268f25 100644 (file)
 #define GPIO_SET_FAL_TRIG_REG  0x02B0002C
 #define GPIO_CLR_FAL_TRIG_REG  0x02B00030
 
-/**
- *  @brief
- *    GPIO pin mapping 
- */
-#define NAND_CLE_GPIO_PIN      GPIO_8     // High: Command Cycle occuring
-#define NAND_ALE_GPIO_PIN      GPIO_9     // High: Address input cycle oddcuring
-#define NAND_NWE_GPIO_PIN      GPIO_10
-#define NAND_NRE_GPIO_PIN      GPIO_12
-#define NAND_NCE_GPIO_PIN      GPIO_13
-#define NAND_MODE_GPIO         GPIO_14
-
-/**
- *  @brief
- *      The standard NAND delay must be big enough to handle the highest possible
- *      operating frequency of the device */
-#define TARGET_NAND_STD_DELAY                          25 // In cpu cycles
 
 /**
  *  @brief
diff --git a/src/device/c6474l/c6474l.c b/src/device/c6474l/c6474l.c
deleted file mode 100755 (executable)
index 976e849..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-/*
- *
- * Copyright (C) 2010 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.
- *
-*/
-
-
-
-/************************************************************************************
- * FILE PURPOSE: C6474 Device Specific functions
- ************************************************************************************
- * FILE NAME: c6474l.c
- *
- * DESCRIPTION: Implements the device specific functions for the IBL
- *
- * @file c6474l.c
- *
- * @brief
- *  This file implements the device specific functions for the IBL
- *
- ************************************************************************************/
-#include "ibl.h"
-#include "device.h"
-#include "pllapi.h"
-#include "emif31api.h"
-#include "pscapi.h"
-#include "gpio.h"
-#include <string.h>
-
-extern cregister unsigned int DNUM;
-
-
-/**
- *  @brief Determine if an address is local
- *
- *  @details
- *    Examines an input address to determine if it is a local address
- */
-bool address_is_local (Uint32 addr)
-{
-    /* L2 */
-    if ((addr >= 0x00800000) && (addr < 0x00898000))
-        return (TRUE);
-
-    /* L1P */
-    if ((addr >= 0x00e00000) && (addr < 0x00e08000))
-        return (TRUE);
-
-    /* L2D */
-    if ((addr >= 0x00f00000) && (addr < 0x00f08000))
-        return (TRUE);
-
-    return (FALSE);
-
-}
-
-
-/**
- * @brief  Convert a local l1d, l1p or l2 address to a global address
- *
- * @details
- *  The global address is formed. If the address is not local then
- *  the input address is returned
- */
-Uint32 deviceLocalAddrToGlobal (Uint32 addr)
-{
-
-    if (address_is_local (addr))
-        addr = (1 << 28) | (DNUM << 24) | addr;
-
-    return (addr);
-
-}
-        
-        
-/**
- * @brief Configure the PLLs
- *
- * @details
- *   Only the main PLL can be configured here. The DDR pll is enabled by default,
- *   and the network PLL is enabled through serdes configuration.
- *   the multiplier and dividers.
- */
-void devicePllConfig (void)
-{
-    if (ibl.pllConfig[ibl_MAIN_PLL].doEnable == TRUE)
-        hwPllSetPll (MAIN_PLL, 
-                     ibl.pllConfig[ibl_MAIN_PLL].prediv,
-                     ibl.pllConfig[ibl_MAIN_PLL].mult,
-                     ibl.pllConfig[ibl_MAIN_PLL].postdiv);
-
-}
-
-/**
- * @brief
- *   Enable the DDR
- *
- * @details
- *   The DDR controller on the c6474 is an emif 3.1. The controller is
- *   initialized directly with the supplied values
- */
-void deviceDdrConfig (void)
-{
-    if (ibl.ddrConfig.configDdr != 0)
-        hwEmif3p1Enable (&ibl.ddrConfig.uEmif.emif3p1);
-
-}
-        
-
-/**
- *  @brief Power up a peripheral
- *
- *  @details
- *    Boot peripherals are powered up
- */
-int32 devicePowerPeriph (int32 modNum)
-{
-    /* If the input value is < 0 there is nothing to power up */
-    if (modNum < 0)
-        return (0);
-
-
-    if (modNum >= TARGET_PWR_MAX_MOD)
-        return (-1);
-
-    return ((int32)pscEnableModule(modNum));
-        
-}
-
-
-/**
- *  @brief  Enable the pass through version of the nand controller
- *
- *  @details  On the evm the nand controller is enabled by setting 
- *            gpio 14 high
- */
-#if 0
-int32 deviceConfigureForNand(void)
-{
-       hwGpioSetDirection(NAND_MODE_GPIO, GPIO_OUT);
-       hwGpioSetOutput(NAND_MODE_GPIO);
-    return (0);
-
-}
-#endif
-
-
-/**
- *  @brief
- *    The e-fuse mac address is loaded
- */
-void deviceLoadDefaultEthAddress (uint8 *maddr)
-{
-    uint32 macA, macB;
-
-    /* Read the e-fuse mac address */
-    macA = *((uint32 *)0x2880834);
-    macB = *((uint32 *)0x2880838);
-
-    maddr[0] = (macB >>  8) & 0xff;
-    maddr[1] = (macB >>  0) & 0xff;
-    maddr[2] = (macA >> 24) & 0xff;
-    maddr[3] = (macA >> 16) & 0xff;
-    maddr[4] = (macA >>  8) & 0xff;
-    maddr[5] = (macA >>  0) & 0xff;
-}
-
-
-
-
-
diff --git a/src/device/c6474l/target.h b/src/device/c6474l/target.h
deleted file mode 100755 (executable)
index 6e67259..0000000
+++ /dev/null
@@ -1,203 +0,0 @@
-/*
- *
- * Copyright (C) 2010 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.
- *
-*/
-
-
-
-/**************************************************************************
- * FILE PURPOSE: Target specific definitions
- **************************************************************************
- * FILE NAME: target.h
- *
- * DESCRIPTION: This file defines target specific values used by low level
- *                             drivers.
- *
- * @file target.h
- *
- * @brief
- *  Low level target specific values are defined
- *
- ***************************************************************************/
-/** 
- *  @brief
- *   Device EMAC definitions
- */
-#define TARGET_DEVICE_CPMAC
-#define TARGET_EMAC_N_PORTS            1
-
-#define TARGET_EMAC_BASE_ADDRESSES     { 0x02c80000u }
-#define TARGET_EMAC_DSC_BASE_ADDR      { 0x02c82000u }
-
-#define TARGET_SGMII_BASE_ADDRESSES    { 0x02c40000u }
-
-/* SGMII offsets (at least the serdes configs, vary between devices, so
- * they are defined here. */
-#define TARGET_SGMII_IDVER             0x000
-#define TARGET_SGMII_SOFT_RESET        0x004
-#define TARGET_SGMII_CONTROL           0x010
-#define TARGET_SGMII_STATUS            0x014
-#define TARGET_SGMII_MR_ADV_ABILITY    0x018
-#define TARGET_SGMII_MR_LP_ADV_ABILITY 0x020
-#define TARGET_SGMII_TX_CFG            0x030
-#define TARGET_SGMII_RX_CFG            0x034
-#define TARGET_SGMII_AUX_CFG           0x038
-
-/* Leave mdio disabled */
-#define dev_mdio_open()     1
-
-/* No chip level reset required for ethernet, the function call is made a void statment */
-#define deviceSetEthResetState(x,y)
-
-/* The mac control register values */
-#define TARGET_MAC_CONTROL       ( 1 << 18)            /* EXT_EN              */     \
-                            | ( 0 << 9 )            /* Round robin         */     \
-                               | ( 1 << 7 )            /* GIG                 */     \
-                            | ( 0 << 6 )            /* TX pacing disabled  */     \
-                            | ( 1 << 5 )            /* GMII RX & TX        */     \
-                            | ( 0 << 4 )            /* TX flow disabled    */     \
-                            | ( 0 << 3 )            /* RX flow disabled    */     \
-                            | ( 0 << 1 )            /* Loopback enabled    */     \
-                            | ( 1 << 0 )            /* full duplex         */
-
-
-/**
- *  @brief
- *    Device Timer definitions
- */
-#define TIMER0_BASE             0x02910000u
-
-#define TIMER_INPUT_DIVIDER     6           /* Timer driven from cpu clock / 6 */
-
-
-/**
- *  @def MAIN_PLL
- */
-#define MAIN_PLL        0   /**< The index to the main PLL */
-
-
-/**
- *  @brief
- *    Device PLL definitions
- */
-#define DEVICE_PLL_BASE(x)  ((x) == MAIN_PLL ? 0x29a0000 : 0)
-
-
-/**
- * @brief 
- *  Device PSC definitions
- */
-#define DEVICE_PSC_BASE     0x02ac0000u
-
-/**
- * @brief
- *  The ethernet is in the always on domain */
-#define TARGET_PWR_ETH(x)   -1
-
-/**
- *  @brief
- *    The nand is done through gpio, which is always powered up.
- *    A value < 0 tells the low level psc driver to simply return success
- */
-#define TARGET_PWR_NAND     -1
-
-/**
- * @brief
- *  Flag to indicate timer 0 power up requested. The time is always on in the 6474
- */
-#define TARGET_PWR_TIMER_0  -1
-
-
-/**
- *  @brief
- *    Device DDR controller definitions
- */
-#define DEVICE_DDR_BASE  0x70000000
-
-/**
- * @brief
- *  The highest module number
- */
-#define TARGET_PWR_MAX_MOD  5
-
-/**
- * @brief
- *   The base address of MDIO 
- */
-#define TARGET_MDIO_BASE    0x2c81800
-
-/**
- *  @brief
- *    GPIO address
- */
-#define GPIO_GPIOPID_REG               0x02B00000
-#define GPIO_GPIOEMU_REG               0x02B00004
-#define GPIO_BINTEN_REG                        0x02B00008
-#define GPIO_DIR_REG                   0x02B00010
-#define GPIO_OUT_DATA_REG              0x02B00014
-#define GPIO_SET_DATA_REG              0x02B00018
-#define GPIO_CLEAR_DATA_REG            0x02B0001C
-#define GPIO_IN_DATA_REG               0x02B00020
-#define GPIO_SET_RIS_TRIG_REG  0x02B00024
-#define GPIO_CLR_RIS_TRIG_REG  0x02B00028
-#define GPIO_SET_FAL_TRIG_REG  0x02B0002C
-#define GPIO_CLR_FAL_TRIG_REG  0x02B00030
-
-/**
- *  @brief
- *    GPIO pin mapping 
- */
-#define NAND_CLE_GPIO_PIN      GPIO_8     // High: Command Cycle occuring
-#define NAND_ALE_GPIO_PIN      GPIO_9     // High: Address input cycle oddcuring
-#define NAND_NWE_GPIO_PIN      GPIO_10
-#define NAND_NRE_GPIO_PIN      GPIO_12
-#define NAND_NCE_GPIO_PIN      GPIO_13
-#define NAND_MODE_GPIO         GPIO_14
-
-/**
- *  @brief
- *      The standard NAND delay must be big enough to handle the highest possible
- *      operating frequency of the device */
-#define TARGET_NAND_STD_DELAY                          25 // In cpu cycles
-
-/**
- *  @brief
- *      The base address of the I2C peripheral, and the module divisor of the cpu clock
- */
-#define DEVICE_I2C_BASE                 0x02b04000
-#define DEVICE_I2C_MODULE_DIVISOR       6
index fe9c19bf5b57edf0732fbf7436fbb0ab4dc5d724..45d50eca302da1bc0847b1b8e2ca081285a5f724 100644 (file)
@@ -405,9 +405,7 @@ extern void     udp_init (void);
 extern Int32    udp_receive (IPHDR* ptr_iphdr);
 
 /* BOOTP Module exported API */
-#ifdef INCLUDE_BLF_NET_BOOTP
-extern void      bootp_init (void);
-#endif
+void bootp_init (void (*asyncComplete)(void *));
 
 #ifdef INCLUDE_BLF_NET_ICMP
 extern void      icmp_receive (IPHDR* ptr_iphdr);
index 46a483b4be3bc794643cd52feaf586989967107b..2104a44bb4c3d37239156560244ab83089ccab26 100644 (file)
@@ -50,6 +50,7 @@
  ********************************************************************************/
 #include "types.h"
 #include "ibl.h"
+#include "iblcfg.h"
 #include "nandhwapi.h"
 #include "gpio.h"
 #include "ecc.h"
index 93bc0761d4132056f6dc432fdd604593b1c86a35..cdcd77baae655e4142b5f489a48261e58cce95f7 100644 (file)
@@ -37,6 +37,7 @@
 
 #include "types.h"
 #include "ibl.h"
+#include "iblcfg.h"
 #include "nandhwapi.h"
 #include "gpio.h"
 #include "target.h"
index 49de8526ed539adb7c18020b5d7e53e1303e8fbd..9cd5d27616c1e6df0f7f8a229768adef8b47c946 100644 (file)
--- a/src/ibl.h
+++ b/src/ibl.h
 
 #include "types.h"
 
+
+#define ibl_MAKE_VERSION(a,b,c,d)  ((a << 24) | (b << 16) | (c << 8) | (d << 0))
+
+
+/**
+ * @brief
+ *  The version number, 1.0.0.0
+ */
+#define ibl_VERSION  ibl_MAKE_VERSION(1,0,0,0)
+
 /* Information used to make generate a bootp request */
 /**
  * @brief
@@ -492,6 +502,8 @@ typedef struct iblStatus_s
 {
     uint32 iblMagic;        /**<  The @ref ibl_MAGIC_VALUE is placed here to indicate the boot has begun */
     
+    uint32 iblVersion;      /**<  The version number. MSB = major, SMSB = minor, SLSB = minor minor LSB= tiny */
+    
     uint32 iblFail;         /**<  If non-zero the IBL has encountered a fatal error */
     
     uint32 i2cRetries;      /**<  Count of I2C read retries */
index c5d56e7b52c3c51a228bb54294a2cfb4bd817e97..b604fd6650ce97ec95a9be8304f76cdbc3338284 100644 (file)
@@ -50,6 +50,8 @@
 /* chipStartCore does nothing, since multiple core start is not supported */
 #define chipStartCore(x,y,z)
 
+#include "iblloc.h"
+
 /* A minimal boot stats structure */
 typedef struct bootTblStats_s  {
 
index b6ea5facf5c7164cedd834370d62d1e66ae4f7a6..f76422eac6f77d05c6c5a9c50f0be7bc5d08f218 100644 (file)
@@ -213,7 +213,8 @@ int cload()
    int result;
 
    load_err = 0;
-   result   = cload_headers() && cload_data();
+
+   result   = cload_headers() && (need_reloc == FALSE) && cload_data();
 
    if (reloc_tab) free(reloc_tab);
    reloc_tab = NULL;
diff --git a/src/interp/coff/cload_main.c b/src/interp/coff/cload_main.c
deleted file mode 100644 (file)
index 3bbdbe9..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- *
- * Copyright (C) 2010 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.
- *
-*/
-
-
-
-/****************************************************************************/
-/* MAIN.C  - Skeleton Driver for COFF Loader       Version 6.00 4/96        */
-/****************************************************************************/
-/*                                                                          */
-/* General:  This module is a skeleton driver for a standalone COFF         */
-/*           loader.  This file is NOT part of the generic loader, but      */
-/*           provides a sample interface to it that can provide a basis     */
-/*           for a specific loader.  YOU MUST CUSTOMIZE THIS PROGRAM        */
-/*           FOR YOUR APPLICATION.  In particular, you must write the       */
-/*           function 'mem_write()' which is the low-level function to      */
-/*           load target memory.                                            */
-/*                                                                          */
-/*           Refer to the documentation provided with the loader for        */
-/*           details on how to interface with it.                           */
-/*                                                                          */
-/* Usage:    cload <-options> filename                                      */
-/* Options:     -b        clear .bss section                                */
-/*              -q        quiet mode (no banner)                            */
-/*              -r xxxx   relocate by xxxx                                  */
-/*                                                                          */
-/*--------------------------------------------------------------------------*/
-/* Functions defined in this module:                                        */
-/*                                                                          */
-/*    main()             - Main driver for loader.                          */
-/*    mem_write()        - Load a buffer of raw data to the target.         */
-/*    set_reloc_amount() - Determine relocation amount for each section.    */
-/*    lookup_sym()       - Stub for symbol lookup routine.                  */
-/*    myalloc()          - Application version of 'malloc()'.               */
-/*    mralloc()          - Application version of 'realloc()'.              */
-/*    load_msg()         - Called by loader to write debug messages.        */
-/*                                                                          */
-/****************************************************************************/
-#include "header.h"
-
-#define READ_BIN "rb"                     /* HOST-SPECIFIC                   */
-
-unsigned int reloc = 0;                 /* RELOCATION AMOUNT               */
-
-void mem_copy(unsigned char* dst, unsigned char* src, int nbytes)
-{
-       int i = 0;
-       for(i = 0; i<nbytes; i++)
-       *(dst+i) = *(src+i);    
-} 
-
-/****************************************************************************/
-/*                                                                          */
-/* MEM_WRITE() - Load a buffer of raw data to the target.                   */
-/*                                                                          */
-/*   THIS FUNCTION MUST BE CUSTOMIZED FOR YOUR APPLICATION !                */
-/*                                                                          */
-/*   (As supplied, this function simply dumps the data out to the screen.)  */
-/*                                                                          */
-/****************************************************************************/
-int mem_write(unsigned char *buffer,        /* POINTER TO DATA BUFFER       */
-              unsigned int   nbytes,        /* NUMBER OF 8-BIT BYTES        */
-              T_ADDR         addr,          /* TARGET DESTINATION ADDRESS   */
-              unsigned char  page)          /* TARGET DESTINATION PAGE      */
-{
-   /*-----------------------------------------------------------------------*/
-   /* INSERT CUSTOM CODE HERE TO LOAD TARGET MEMORY.                        */
-   /*-----------------------------------------------------------------------*/
-       mem_copy((void*)addr, (void*)buffer, nbytes); 
-   return 1;
-}
-
-
-/****************************************************************************/
-/*                                                                          */
-/* SET_RELOC_AMOUNT() - Determine relocation amount for each section.       */
-/*                                                                          */
-/****************************************************************************/
-int set_reloc_amount()
-{
-  int i;
-
-  for (i = 0; i<  n_sections; ++i) reloc_amount[i] = reloc;
-  return 1;
-}
-
-
-/****************************************************************************/
-/*                                                                          */
-/* LOOKUP_SYM() - Stub for symbol lookup routine.                           */
-/*                                                                          */
-/****************************************************************************/
-void lookup_sym(int indx, SYMENT *sym, AUXENT *aux)
-{}
-
-
-/****************************************************************************/
-/*                                                                          */
-/* LOAD_SYMS() - Stub for symbol load routine.  This routine is only called */
-/*               if the global flag 'need_symbols' is TRUE.                 */
-/*                                                                          */
-/****************************************************************************/
-int load_syms(int need_reloc)
-{
-   return 1;
-}
index 68ec69cfc1e2e1c473c3c0fae8f922888479684e..ce548b869ed48e380ebb69e4223d578f731a32b2 100644 (file)
@@ -850,7 +850,7 @@ static BOOL allocate_dynamic_segments_and_relocate_symbols
 #endif
 
 
-#if 0
+#if 1
 /*****************************************************************************/
 /* delete_DLIMP_Loaded_Module()                                              */
 /*                                                                           */
@@ -881,8 +881,10 @@ static void delete_DLIMP_Loaded_Module(DLIMP_Loaded_Module **pplm)
     /* Hacky way of indicating that the base image is no longer available.  */
     /* WHHHHAAAAAAATTT!?!?!?!?!?!                                           */
     /*----------------------------------------------------------------------*/
+#if 0
     if (loaded_module->file_handle == DLIMP_application_handle)
         DLIMP_application_handle = 0;
+#endif
 
     /*-----------------------------------------------------------------------*/
     /* Free host heap memory that was allocated for the internal loaded      */
@@ -985,7 +987,7 @@ static DLIMP_Loaded_Module *detach_loaded_module(DLIMP_Dynamic_Module *dyn_modul
 }
 
 
-#if 0
+#if 1
 /*****************************************************************************/
 /* delete_DLIMP_Dynamic_Module()                                             */
 /*                                                                           */
@@ -1990,9 +1992,7 @@ static int32_t dload_static_executable(LOADER_FILE_DESC *fd,
    /*------------------------------------------------------------------------*/
    /* Destruct dynamic module object.                                        */
    /*------------------------------------------------------------------------*/
-#if 0
    delete_DLIMP_Dynamic_Module(&dyn_module);
-#endif
 
 #if LOADER_DEBUG
    if (debugging_on) printf("Finished dload_static_executable()\n");
@@ -2409,6 +2409,7 @@ int32_t DLOAD_load(LOADER_FILE_DESC *fd, int argc, char** argv, int32_t *entry)
    /*------------------------------------------------------------------------*/
    /* Support static loading as special case.                                */
    /*------------------------------------------------------------------------*/
+   *entry = 0;
    if (!dyn_module->relocatable)  {
       return (dload_static_executable(fd, dyn_module));
       *entry = dyn_module->fhdr.e_entry;
index 201f36f797f9d80c9ecf36ba933e2115cdf05d47..4af0b1578ee17747ab2ac8428e3cb128aed6a421 100644 (file)
@@ -70,16 +70,17 @@ C6X_C_DIR+= ;$(IBL_ROOT)/arch/$(ARCH)
 C6X_C_DIR+= ;$(IBL_ROOT)/device
 C6X_C_DIR+= ;$(IBL_ROOT)/device/$(TARGET)
 C6X_C_DIR+= ;$(IBL_ROOT)/ethboot
+C6X_C_DIR+= ;$(IBL_ROOT)/nandboot
 C6X_C_DIR+= ;$(IBL_ROOT)/driver/timer
 C6X_C_DIR+= ;$(IBL_ROOT)/hw/i2c
 C6X_C_DIR+= ;$(IBL_ROOT)/cfg/$(TARGET)
 C6X_C_DIR+= ;$(STDINC)
 
 # Paths to the kicker intermediate boot loader for devices which require them
-ifeq ($(TARGET),c6455)
- C6X_C_DIR+= ;$(IBL_ROOT)/make/ibl_c6455
- C6X_C_DIR+= ;$(IBL_ROOT)/util/romparse
-endif
+#ifeq ($(TARGET),c6455)
+# C6X_C_DIR+= ;$(IBL_ROOT)/make/ibl_c6455
+# C6X_C_DIR+= ;$(IBL_ROOT)/util/romparse
+#endif
 
 
 
index a5986eb420ff933eb59f2c3d6cc1a9885a60ad21..b6f5a80245aa32ad6a5f27190a7c1833f9ccfbdc 100644 (file)
@@ -297,7 +297,7 @@ void i2cReadBlock (void)
                                 4,                          /* The number of bytes to read */
                                 i2cData,                    /* Where to store the bytes */
                                 i2cReadAddress >> 16,       /* The bus address of the eeprom */
-                                IBL_I2C_CFG_ADDR_DELAY)     /* The delay between sending the address and reading data */
+                                IBL_CFG_I2C_ADDR_DELAY)     /* The delay between sending the address and reading data */
     
              != I2C_RET_OK)  {
 
@@ -316,7 +316,7 @@ void i2cReadBlock (void)
                                 len,                        /* The number of bytes to read */
                                 i2cData,                    /* Where to store the bytes */
                                 i2cReadAddress >> 16,       /* The bus address of the eeprom */
-                                IBL_I2C_CFG_ADDR_DELAY)     /* The delay between sending the address and reading data */
+                                IBL_CFG_I2C_ADDR_DELAY)     /* The delay between sending the address and reading data */
     
              != I2C_RET_OK)  {
 
@@ -430,6 +430,7 @@ void main (void)
 
     memset (&iblStatus, 0, sizeof(iblStatus_t));
     iblStatus.iblMagic     = ibl_MAGIC_VALUE;
+    iblStatus.iblVersion   = ibl_VERSION;
     iblStatus.activePeriph = ibl_ACTIVE_PERIPH_I2C;
 
     /* Read the endianness setting of the device */
@@ -438,19 +439,19 @@ void main (void)
     /* Load the default configuration table from the i2c. The actual speed of the device
      * isn't really known here, since it is part of the table, so a compile time
      * value is used (the pll may have been configured during the initial load) */
-    hwI2Cinit (IBL_I2C_DEV_FREQ_MHZ,        /* The CPU frequency during I2C data load */
-               DEVICE_I2C_MODULE_DIVISOR,   /* The divide down of CPU that drives the i2c */
-               IBL_I2C_CLK_FREQ_KHZ,        /* The I2C data rate used during table load */
-               IBL_I2C_OWN_ADDR);           /* The address used by this device on the i2c bus */
+    hwI2Cinit (IBL_CFG_I2C_DEV_FREQ_MHZ,        /* The CPU frequency during I2C data load */
+               DEVICE_I2C_MODULE_DIVISOR,       /* The divide down of CPU that drives the i2c */
+               IBL_CFG_I2C_CLK_FREQ_KHZ,        /* The I2C data rate used during table load */
+               IBL_CFG_I2C_OWN_ADDR);           /* The address used by this device on the i2c bus */
 
 
     /* Read the I2C mapping information from the eeprom */
     for (;;)  {
-        if (hwI2cMasterRead (IBL_I2C_MAP_TABLE_DATA_ADDR,     /* The address on the eeprom of the data mapping */
-                             sizeof(iblI2cMap_t),             /* The number of bytes to read */
-                             (UINT8 *)&map,                   /* Where to store the bytes */
-                             IBL_I2C_MAP_TABLE_DATA_BUS_ADDR, /* The bus address of the eeprom */
-                             IBL_I2C_CFG_ADDR_DELAY)          /* The delay between sending the address and reading data */
+        if (hwI2cMasterRead (IBL_CFG_I2C_MAP_TABLE_DATA_ADDR,     /* The address on the eeprom of the data mapping */
+                             sizeof(iblI2cMap_t),                 /* The number of bytes to read */
+                             (UINT8 *)&map,                       /* Where to store the bytes */
+                             IBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR, /* The bus address of the eeprom */
+                             IBL_CFG_I2C_ADDR_DELAY)              /* The delay between sending the address and reading data */
 
              == I2C_RET_OK)  {
 
@@ -505,7 +506,7 @@ void main (void)
                              sizeof(ibl_t),                  /* The number of bytes to read */
                              (UINT8 *)&ibl,                  /* Where to store the bytes */
                              configAddrMsw,                  /* The bus address of the eeprom */
-                             IBL_I2C_CFG_ADDR_DELAY)         /* The delay between sending the address and reading data */
+                             IBL_CFG_I2C_ADDR_DELAY)         /* The delay between sending the address and reading data */
 
              == I2C_RET_OK)  {
 
index 2bac08195538fb7e08119aecb02f5c44210b4bd2..7c8986bab57fa6a789946191da4837739bf306a0 100644 (file)
@@ -54,6 +54,7 @@
 #include "iblcfg.h"
 #include "device.h"
 #include "ethboot.h"
+#include "nandboot.h"
 #include "bis.h"
 #include "coffwrap.h"
 #include "iblbtbl.h"
@@ -129,7 +130,8 @@ void main (void)
 
     /* Initialize the status structure */
     iblMemset (&iblStatus, 0, sizeof(iblStatus_t));
-    iblStatus.iblMagic = ibl_MAGIC_VALUE;
+    iblStatus.iblMagic   = ibl_MAGIC_VALUE;
+    iblStatus.iblVersion = ibl_VERSION;
 
 
     /* Power up the timer */
index 4dcb06851a7f7501601cb542309758adf004fced..5c6547d7a5143bc738c4d3bc1eb3a2773225edba 100644 (file)
 #*
 #* or to make a board specific configuraiton
 #*
-#*                     make evm_c6455 | evm_c6472 | evm_c6474
+#*                     make evm_c6455 | evm_c6472 | evm_c6474 | evm_c6457
 #*
 #* or to test the builds by making all the devices and testing excludes
 #*
 #*                     make test_build
 #*******************************************************************************************
 
-IBLS_C6X= c6455 c6472 c6474 c6474l c6457
+IBLS_C6X= c6455 c6472 c6474 c6457
 EVMS_C6X= evm_c6455 evm_c6472 evm_c6474
 
 
@@ -89,8 +89,6 @@ endif
  
 
 
-
-
 # The endian of the build. The default target builds a single ROM image with both endians present
 ifeq ($(ENDIAN),big)
  ENDIAN_MODE=big
@@ -136,11 +134,17 @@ evm_c6472:
 
 # The 6474 EVM has a 32k eeprom. A stripped down version is build with only one endian.
 evm_c6474:
-       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=little EXCLUDES='ELF NAND BIS' c6474
-       cp ibl_c6474/i2crom.dat ibl_c6474/i2crom.dat i2crom_0x50.dat
-       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x51 COMPACT_I2C=no ENDIAN_MODE=big EXCLUDES='ELF NAND BIS' c6474
-       cp ibl_c6474/i2crom.dat ibl_c6474/i2crom.dat i2crom_0x51.dat
-
+       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=little EXCLUDES='ELF NAND BIS' I2C_SIZE_BYTES=0x8000 c6474
+       cp ibl_c6474/i2crom.dat ibl_c6474/i2crom_0x50.dat
+       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x51 COMPACT_I2C=yes ENDIAN_MODE=big EXCLUDES='ELF NAND BIS' I2C_SIZE_BYTES=0x8000 c6474
+       cp ibl_c6474/i2crom.dat ibl_c6474/i2crom_0x51.dat
+
+# The 6457 EVM
+evm_c6457:
+       make -f makestg1 ARCH=c64x TARGET=c6457 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=little EXCLUDES='ELF NAND BIS' I2C_SIZE_BYTES=0x8000 c6457
+       cp ibl_c6457/i2crom.dat ibl_c6457/i2crom_0x50.dat
+       make -f makestg1 ARCH=c64x TARGET=c6457 I2C_BUS_ADDR=0x51 COMPACT_I2C=yes ENDIAN_MODE=big EXCLUDES='ELF NAND BIS' I2C_SIZE_BYTES=0x8000 c6457
+       cp ibl_c6457/i2crom.dat ibl_c6457/i2crom_0x51.dat
 
 # Test - builds all the targets, with single component exclusion
 test_build:
@@ -152,40 +156,47 @@ test_build:
        make -f makestg1 ARCH=c64x TARGET=c6455 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=ELF  c6455
        make -f makestg1 ARCH=c64x TARGET=c6455 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=BLOB c6455
 
-       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=     c6455
-       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=ETH  c6455
-       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=NAND c6455
-       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=BIS  c6455
-       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=COFF c6455
-       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=ELF  c6455
-       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=BLOB c6455
-
-       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=     c6455
-       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=ETH  c6455
-       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=NAND c6455
-       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=BIS  c6455
-       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=COFF c6455
-       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=ELF  c6455
-       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=BLOB c6455
+       make -f makestg1 ARCH=c64x TARGET=c6457 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=     c6457
+       make -f makestg1 ARCH=c64x TARGET=c6457 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=ETH  c6457
+       make -f makestg1 ARCH=c64x TARGET=c6457 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=NAND c6457
+       make -f makestg1 ARCH=c64x TARGET=c6457 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=BIS  c6457
+       make -f makestg1 ARCH=c64x TARGET=c6457 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=COFF c6457
+       make -f makestg1 ARCH=c64x TARGET=c6457 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=ELF  c6457
+       make -f makestg1 ARCH=c64x TARGET=c6457 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=BLOB c6457
+
+       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=     c6472
+       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=ETH  c6472
+       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=NAND c6472
+       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=BIS  c6472
+       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=COFF c6472
+       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=ELF  c6472
+       make -f makestg1 ARCH=c64x TARGET=c6472 I2C_BUS_ADDR=0x50 COMPACT_I2C=no ENDIAN_MODE=both EXCLUDES=BLOB c6472
+
+       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=     c6474
+       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=ETH  c6474
+       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=NAND c6474
+       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=BIS  c6474
+       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=COFF c6474
+       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=ELF  c6474
+       make -f makestg1 ARCH=c64x TARGET=c6474 I2C_BUS_ADDR=0x50 COMPACT_I2C=yes ENDIAN_MODE=both EXCLUDES=BLOB c6474
+
 
 # will need to add a line for each additional ARCH type added
 clean:
        make -f makestg2 clean   ARCH=c64x TARGET=c6472
        make -f makestg2 cleant  ARCH=c64x TARGET=c6472
        make -f makestg2 cleant  ARCH=c64x TARGET=c6474
-       make -f makestg2 cleant  ARCH=c64x TARGET=c6474l
+       make -f makestg2 cleant  ARCH=c64x TARGET=c6455
        make -f makestg2 cleant  ARCH=c64x TARGET=c6457
        make -C ../util/bconvert       clean
        make -C ../util/btoccs         clean
        make -C ../util/i2cConfig      clean    ARCH=c64x TARGET=c6455
        make -C ../util/i2cConfig      clean    ARCH=c64x TARGET=c6472
        make -C ../util/i2cConfig      clean    ARCH=c64x TARGET=c6474
-       make -C ../util/i2cConfig      clean    ARCH=c64x TARGET=c6474l
        make -C ../util/i2cConfig      clean    ARCH=c64x TARGET=c6457
        make -C ../util/nandwriter     clean    ARCH=c64x TARGET=c6455
        make -C ../util/nandwriter     clean    ARCH=c64x TARGET=c6472
        make -C ../util/nandwriter     clean    ARCH=c64x TARGET=c6474
-       make -C ../util/nandwriter     clean    ARCH=c64x TARGET=c6474l
        make -C ../util/nandwriter     clean    ARCH=c64x TARGET=c6457
        make -C ../util/romparse       clean
        make -C ../test/test1              clean
index a3f3d17af3bf328897840455dd87902890264aa8..b2ec6ac9463efeb656044ab8008c4a2da5fb5134 100644 (file)
@@ -34,7 +34,7 @@ section
 ; match the definition of struct iblI2cMap_t defined in ibl.h.
 layout
 {
-  dev_addr     = IBL_I2C_MAP_TABLE_DATA_ADDR           ; Defined in iblcfg.h
+  dev_addr     = IBL_CFG_I2C_MAP_TABLE_DATA_ADDR               ; Defined in iblcfg.h
   dev_addr_ext = I2C_BUS_ADDR
   file_align   = 0x80
 
diff --git a/src/make/ibl_c6455/i2crom_be.map b/src/make/ibl_c6455/i2crom_be.map
deleted file mode 100644 (file)
index 386b1f9..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-section 
-{
-  param_index   = 0
-  boot_mode     = 5
-  options       = 1
-
-  core_freq_mhz    = 50
-  i2c_clk_freq_khz = 400
-
-  dev_addr_ext = 0x50
-
-  multi_i2c_id = 0
-  my_i2c_id    = 1
-  address_delay = 0
-  exe_file = "ibl_c6455/ibl.i2c.be.ccs"
-}
-
diff --git a/src/make/ibl_c6455/i2crom_le.map b/src/make/ibl_c6455/i2crom_le.map
deleted file mode 100644 (file)
index 96b40fc..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-section 
-{
-  param_index   = 0
-  boot_mode     = 5
-  options       = 1
-
-  core_freq_mhz    = 50
-  i2c_clk_freq_khz = 400
-
-  dev_addr_ext = 0x50
-
-  multi_i2c_id = 0
-  my_i2c_id    = 1
-  address_delay = 0
-  exe_file = "ibl_c6455/ibl.i2c.le.ccs"
-}
-  
index 09400f1b1eed29426ea3b3de0226172391cc3f04..3e326d899dadd7dc3b6bf0bc2fe71a66e3fc4b9e 100644 (file)
@@ -7,7 +7,6 @@
 ../device/c64x/make/c6455.ENDIAN_TAG.oc
 ../driver/c64x/make/timer.ENDIAN_TAG.oc
 ../hw/c64x/make/t64.ENDIAN_TAG.oc
-../hw/c64x/make/psc.ENDIAN_TAG.oc
 ../hw/c64x/make/emif31.ENDIAN_TAG.oc
 
 
diff --git a/src/make/ibl_c6457/i2crom.map.pre b/src/make/ibl_c6457/i2crom.map.pre
new file mode 100644 (file)
index 0000000..8be6936
--- /dev/null
@@ -0,0 +1,72 @@
+#include "iblcfg.h"
+;  This file is run through the C preprocessor to get the build time layout information
+;  The following values must be defined:
+;     I2C_BUS_ADDR   - The I2C bus address of the eeprom holding the ROM boot info and the layout info
+;        INIT_EXE_FILE  - The I2C blocked stage 1 of the ibl
+;     EXE_FILE_1     - The I2C blocked stage 2 of the ibl, must be the little endian version
+;     EXE_FILE_2        - The I2C blocked stage 2 of the ibl, must be the big endian version
+;     PAD_FILE_ID_1  - This pad holds the IBL configuration structure for the little endian version
+;     PAD_FILE_ID_2  - This pad holds the IBL configuration structure for the big endian version
+;
+;  The section statement directs the ROM boot loader to load the initial endian independent 
+;  portion of the IBL
+section 
+{
+  param_index   = 1
+  boot_mode     = 257
+  sw_pll               = 20
+  options       = 1
+
+  core_freq_mhz    = 1000
+  i2c_clk_freq_khz = 100
+
+  dev_addr_ext = I2C_BUS_ADDR
+
+  multi_i2c_id = 0
+  my_i2c_id    = 1
+  address_delay = 200
+  exe_file = INIT_EXE_FILE
+}
+
+; The layout statement defines how the resulting I2C image is layed out. The base address
+; of this (given in the dev_addr) statement must be known to the initial IBL program
+; at compile time. The layout block is simple a group of 32 bit i2c addresses, so 
+; the order of the exe_file and pad_file_id statements must be configured so as to
+; match the definition of struct iblI2cMap_t defined in ibl.h.
+layout
+{
+  dev_addr     = IBL_CFG_I2C_MAP_TABLE_DATA_ADDR               ; Defined in iblcfg.h
+  dev_addr_ext = I2C_BUS_ADDR
+  file_align   = 0x80
+
+  exe_file    = EXE_FILE_1
+  pad_file_id = PAD_FILE_ID_1
+
+
+  exe_file    = EXE_FILE_2
+  pad_file_id = PAD_FILE_ID_2
+}
+
+; The pad statements simply provide space for the IBL configuration structures. It is valid to
+; have a single configuration structure which is used for both endian values.
+pad
+{
+  pad_file_id  = 1
+  dev_addr     = 0x200
+  dev_addr_ext = I2C_BUS_ADDR
+  len          = 0x300
+}
+
+#if (PAD_FILE_ID_1 != PAD_FILE_ID_2)
+pad
+{
+  pad_file_id  = 2
+  dev_addr     = 0x500
+  dev_addr_ext = I2C_BUS_ADDR
+  len          = 0x300
+}
+#endif
+
+
+
+
diff --git a/src/make/ibl_c6457/i2crom_le.map b/src/make/ibl_c6457/i2crom_le.map
deleted file mode 100755 (executable)
index a578d86..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-section 
-{
-  param_index   = 0
-  boot_mode     = 257
-  sw_pll               = 20
-  options       = 1
-
-  core_freq_mhz    = 1000
-  i2c_clk_freq_khz = 100
-
-  dev_addr_ext = 0x50
-
-  multi_i2c_id = 0
-  my_i2c_id    = 1
-  address_delay = 0
-  exe_file = "ibl_c6457/ibl.i2c.le.ccs"
-}
-
index 6bb33b331834791bb572c556a63cc2246bc59438..ea17dd222850edf4177dfbb133237f7f16138dbd 100755 (executable)
@@ -7,66 +7,21 @@
  *
  ************************************************************************************/
 
+/* In order to speed build time during debug, the object files are saved in
+ * both big and little endian format. The include file is generated by
+ * make to use the correct endian object files
+ */
+#include "ibl_objs.inc"
 
-../main/c64x/make/iblmain.oc
-../device/c64x/make/c6457.oc
-../ethboot/c64x/make/ethboot.oc
-../driver/c64x/make/net.oc
-../driver/c64x/make/arp.oc
-../driver/c64x/make/ip.oc
-../driver/c64x/make/udp.oc
-../driver/c64x/make/stream.oc
-../driver/c64x/make/timer.oc
-../driver/c64x/make/bootp.oc
-../driver/c64x/make/tftp.oc
-../hw/c64x/make/t64.oc
-../hw/c64x/make/cpmacdrv.oc
-../hw/c64x/make/pll.oc
-../hw/c64x/make/psc.oc
-../hw/c64x/make/emif31.oc
-../hw/c64x/make/mdio.oc
-../hw/c64x/make/i2c.oc
-../hw/c64x/make/sgmii.oc
-../interp/c64x/make/bis.oc
-../interp/c64x/make/cload.oc
-../interp/c64x/make/osal.oc
-../interp/c64x/make/btblwrap.oc
-../interp/c64x/make/btblpr.oc
-../interp/c64x/make/gem.oc
-../interp/c64x/make/blob.oc
 
-/* ../interp/c64x/make/dload.oc */
-/* ../interp/c64x/make/elfwrap.oc */
-/* ../interp/c64x/make/dlw_client.oc */
-/* ../interp/c64x/make/dload_endian.oc */
-/* ../interp/c64x/make/ArrayList.oc */
+/* Symbols from the 1st portion of the load, generated by the make process */
+#include "ibl_init_symbols.inc"
 
-/* ../nandboot/c64x/make/nandboot.oc */
-/* ../driver/c64x/make/nand.oc */
-/* ../ecc/c64x/make/3byte_ecc.oc */
-/* ../hw/c64x/make/gpio.oc */
-/* ../hw/c64x/make/nandgpio.oc */
-
--c
--stack 0x800
--heap  0x6000
-
-
-
-MEMORY
-{
-       TEXT   :  origin = 0x801000, length = 0x20000
-       STACK  :  origin = 0x821000, length = 0x0800
-       HEAP   :  origin = 0x821800, length = 0x6000
-       DATA   :  origin = 0x827800, length = 0x3000
-       CFG    :  origin = 0x831800, length = 0x0300
-       STAT :    origin = 0x831b00, length = 0x0200
-}
+/* Common memory and section areas between ibl_init and ibl */
+#include "ibl_common.inc"
 
 SECTIONS
 {
-       .stack  > STACK
-       .sysmem > HEAP
        .cinit  > TEXT
        .const  > TEXT
        .text   > TEXT
@@ -74,8 +29,5 @@ SECTIONS
        .far    > DATA
        .bss    > DATA
 
-    .ibl_config_table > CFG
-       .ibl_status_table > STAT
-
 }
 
diff --git a/src/make/ibl_c6457/ibl_common.inc b/src/make/ibl_c6457/ibl_common.inc
new file mode 100644 (file)
index 0000000..e9be06e
--- /dev/null
@@ -0,0 +1,38 @@
+/************************************************************************************
+ * FILE PURPOSE: Provide common memory and sections definitions for ibl_init and ibl
+ ************************************************************************************
+ * FILE NAME: ibl_common.inc
+ *
+ * DESCRIPTION: Defines the common memory map and section placement required
+ *                         to get ibl and ibl_init to work together in a two stage load
+ *                             process.
+ *************************************************************************************/
+
+-c
+-stack 0x800
+-heap  0x6000
+
+
+MEMORY
+{
+       TEXT_INIT :  origin = 0x801000, length = 0x2800
+       TEXT      :  origin = 0x803800, length = 0xd800
+       STACK     :  origin = 0x811000, length = 0x0800
+       HEAP      :  origin = 0x811800, length = 0x6000
+       DATA_INIT :  origin = 0x817800, length = 0x0200
+       DATA      :  origin = 0x817a00, length = 0x2e00
+       CFG       :  origin = 0x821800, length = 0x0300
+       STAT      :  origin = 0x821b00, length = 0x0200
+}
+
+
+SECTIONS
+{
+       .stack  > STACK
+       .sysmem > HEAP
+
+       .ibl_config_table > CFG
+       .ibl_status_table > STAT
+
+}
+
diff --git a/src/make/ibl_c6457/ibl_init.cmd b/src/make/ibl_c6457/ibl_init.cmd
new file mode 100644 (file)
index 0000000..6416ca2
--- /dev/null
@@ -0,0 +1,31 @@
+/************************************************************************************
+ * FILE PURPOSE: Define the memory usage of the ibl module for the c6474
+ ************************************************************************************
+ * FILE NAME: ibl.cmd
+ *
+ * DESCRIPTION: The memory placement for the IBL is defined
+ *
+ ************************************************************************************/
+
+/* In order to speed build time during debug, the object files are saved in
+ * both big and little endian format. The include file is generated by
+ * make to use the correct endian object files
+ */
+#include "ibl_init_objs.inc"
+
+
+/* Common memory and section areas between ibl_init and ibl */
+#include "ibl_common.inc"
+
+
+SECTIONS
+{
+       .cinit  > TEXT_INIT
+       .const  > TEXT_INIT
+       .text   > TEXT_INIT
+       .switch > TEXT_INIT
+       .far    > DATA_INIT
+       .bss    > DATA_INIT
+
+}
+
old mode 100755 (executable)
new mode 100644 (file)
similarity index 100%
rename from src/make/ibl_c6474l/ibl.rmd
rename to src/make/ibl_c6457/ibl_init.rmd
diff --git a/src/make/ibl_c6457/ibl_init_image.rmd b/src/make/ibl_c6457/ibl_init_image.rmd
new file mode 100644 (file)
index 0000000..2d305e7
--- /dev/null
@@ -0,0 +1,10 @@
+-a
+-e _c_int00
+
+ROMS
+{
+       ROM1:  org = 0x801000, length = 0x20000, memwidth = 32, romwidth = 32
+       files = { ibl_le.b }
+}
+
+
diff --git a/src/make/ibl_c6457/ibl_init_objs_template.inc b/src/make/ibl_c6457/ibl_init_objs_template.inc
new file mode 100644 (file)
index 0000000..98cff0b
--- /dev/null
@@ -0,0 +1,18 @@
+/* ibl_init_objs_template.inc
+ *
+ *  list of object files tagged with the endian field for replacement during make
+ */
+
+../main/c64x/make/iblinit.ENDIAN_TAG.oc
+../device/c64x/make/c6474init.ENDIAN_TAG.oc
+../hw/c64x/make/pll.ENDIAN_TAG.oc
+../hw/c64x/make/i2c.ENDIAN_TAG.oc
+../interp/c64x/make/btblwrap.ENDIAN_TAG.oc
+../interp/c64x/make/btblpr.ENDIAN_TAG.oc
+../interp/c64x/make/gem.ENDIAN_TAG.oc
+
+
+
+
+
+
diff --git a/src/make/ibl_c6457/ibl_objs_template.inc b/src/make/ibl_c6457/ibl_objs_template.inc
new file mode 100644 (file)
index 0000000..adefe56
--- /dev/null
@@ -0,0 +1,57 @@
+/* ibl_objs_template.inc
+ *
+ * list of object files tagged with the endian field for replacement during make
+ */
+
+../main/c64x/make/iblmain.ENDIAN_TAG.oc
+../device/c64x/make/c6457.ENDIAN_TAG.oc
+../driver/c64x/make/timer.ENDIAN_TAG.oc
+../hw/c64x/make/t64.ENDIAN_TAG.oc
+../hw/c64x/make/psc.ENDIAN_TAG.oc
+../hw/c64x/make/emif31.ENDIAN_TAG.oc
+
+
+#ifndef EXCLUDE_BIS
+../interp/c64x/make/bis.ENDIAN_TAG.oc
+#endif
+
+#ifndef EXCLUDE_COFF
+../interp/c64x/make/cload.ENDIAN_TAG.oc
+../interp/c64x/make/osal.ENDIAN_TAG.oc
+#endif
+
+#ifndef EXCLUDE_BLOB
+../interp/c64x/make/blob.ENDIAN_TAG.oc
+#endif
+
+
+#ifndef EXCLUDE_ELF
+../interp/c64x/make/dload.ENDIAN_TAG.oc
+../interp/c64x/make/elfwrap.ENDIAN_TAG.oc
+../interp/c64x/make/dlw_client.ENDIAN_TAG.oc
+../interp/c64x/make/dload_endian.ENDIAN_TAG.oc
+../interp/c64x/make/ArrayList.ENDIAN_TAG.oc
+#endif
+
+#ifndef EXCLUDE_ETH
+../ethboot/c64x/make/ethboot.ENDIAN_TAG.oc
+../driver/c64x/make/net.ENDIAN_TAG.oc
+../driver/c64x/make/arp.ENDIAN_TAG.oc
+../driver/c64x/make/ip.ENDIAN_TAG.oc
+../driver/c64x/make/udp.ENDIAN_TAG.oc
+../driver/c64x/make/stream.ENDIAN_TAG.oc
+../driver/c64x/make/bootp.ENDIAN_TAG.oc
+../driver/c64x/make/tftp.ENDIAN_TAG.oc
+../hw/c64x/make/cpmacdrv.ENDIAN_TAG.oc
+../hw/c64x/make/mdio.ENDIAN_TAG.oc
+../hw/c64x/make/sgmii.ENDIAN_TAG.oc
+#endif
+
+#ifndef EXCLUDE_NAND
+../nandboot/c64x/make/nandboot.ENDIAN_TAG.oc
+../driver/c64x/make/nand.ENDIAN_TAG.oc
+../ecc/c64x/make/3byte_ecc.ENDIAN_TAG.oc
+../hw/c64x/make/gpio.ENDIAN_TAG.oc
+../hw/c64x/make/nandgpio.ENDIAN_TAG.oc
+#endif
+
index 29643671484be03c5aec77b99e641a701aa2ad54..05c480c9d0d09970147f03692605ec0777cf6c59 100644 (file)
@@ -35,7 +35,7 @@ section
 ; match the definition of struct iblI2cMap_t defined in ibl.h.
 layout
 {
-  dev_addr     = IBL_I2C_MAP_TABLE_DATA_ADDR           ; Defined in iblcfg.h
+  dev_addr     = IBL_CFG_I2C_MAP_TABLE_DATA_ADDR               ; Defined in iblcfg.h
   dev_addr_ext = I2C_BUS_ADDR
   file_align   = 0x80
 
diff --git a/src/make/ibl_c6472/i2crom_be.map b/src/make/ibl_c6472/i2crom_be.map
deleted file mode 100644 (file)
index 0bff0a5..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-section 
-{
-  param_index   = 0
-  boot_mode     = 257
-  sw_pll               = 25
-  options       = 1
-
-  core_freq_mhz    = 625
-  i2c_clk_freq_khz = 200
-
-  dev_addr_ext = 0x51
-
-  multi_i2c_id = 0
-  my_i2c_id    = 1
-  address_delay = 0
-  exe_file = "ibl_c6472/ibl.i2c.be.ccs"
-}
-
diff --git a/src/make/ibl_c6472/i2crom_le.map b/src/make/ibl_c6472/i2crom_le.map
deleted file mode 100644 (file)
index 9c9d1bd..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-section 
-{
-  param_index   = 0
-  boot_mode     = 257
-  sw_pll               = 25
-  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 = "ibl_c6472/ibl.i2c.le.ccs"
-}
-
index 19bb501135dbba848e732e40e31902bb0c974b1c..8be6936ecd058f877800557a7f49994ab50ab89b 100644 (file)
@@ -35,7 +35,7 @@ section
 ; match the definition of struct iblI2cMap_t defined in ibl.h.
 layout
 {
-  dev_addr     = IBL_I2C_MAP_TABLE_DATA_ADDR           ; Defined in iblcfg.h
+  dev_addr     = IBL_CFG_I2C_MAP_TABLE_DATA_ADDR               ; Defined in iblcfg.h
   dev_addr_ext = I2C_BUS_ADDR
   file_align   = 0x80
 
@@ -52,7 +52,7 @@ layout
 pad
 {
   pad_file_id  = 1
-  dev_addr     = 0x500
+  dev_addr     = 0x200
   dev_addr_ext = I2C_BUS_ADDR
   len          = 0x300
 }
@@ -61,7 +61,7 @@ pad
 pad
 {
   pad_file_id  = 2
-  dev_addr     = 0x800
+  dev_addr     = 0x500
   dev_addr_ext = I2C_BUS_ADDR
   len          = 0x300
 }
diff --git a/src/make/ibl_c6474/i2crom_be.map b/src/make/ibl_c6474/i2crom_be.map
deleted file mode 100644 (file)
index 09de35f..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-section 
-{
-  param_index   = 1
-  boot_mode     = 257
-  sw_pll               = 20
-  options       = 1
-
-  core_freq_mhz    = 1000
-  i2c_clk_freq_khz = 100
-
-  dev_addr_ext = 0x50
-
-  multi_i2c_id = 0
-  my_i2c_id    = 1
-  address_delay = 0
-  exe_file = "ibl_c6474/ibl.i2c.be.ccs"
-}
-
diff --git a/src/make/ibl_c6474/i2crom_le.map b/src/make/ibl_c6474/i2crom_le.map
deleted file mode 100644 (file)
index b1ae02d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-section 
-{
-  param_index   = 1
-  boot_mode     = 257
-  sw_pll               = 20
-  options       = 1
-
-  core_freq_mhz    = 1000
-  i2c_clk_freq_khz = 100
-
-  dev_addr_ext = 0x50
-
-  multi_i2c_id = 0
-  my_i2c_id    = 1
-  address_delay = 0
-  exe_file = "ibl_c6474/ibl.i2c.le.ccs"
-}
-
index 8cc0067f6a366a9123318b8a0d6d75572705ecf3..ea17dd222850edf4177dfbb133237f7f16138dbd 100644 (file)
@@ -22,8 +22,6 @@
 
 SECTIONS
 {
-       .stack  > STACK
-       .sysmem > HEAP
        .cinit  > TEXT
        .const  > TEXT
        .text   > TEXT
diff --git a/src/make/ibl_c6474l/i2crom_be.map b/src/make/ibl_c6474l/i2crom_be.map
deleted file mode 100755 (executable)
index 604d5de..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-section 
-{
-  param_index   = 0
-  boot_mode     = 257
-  sw_pll               = 20
-  options       = 1
-
-  core_freq_mhz    = 1000
-  i2c_clk_freq_khz = 100
-
-  dev_addr_ext = 0x50
-
-  multi_i2c_id = 0
-  my_i2c_id    = 1
-  address_delay = 0
-  exe_file = "ibl_c6474l/ibl.i2c.be.ccs"
-}
-
diff --git a/src/make/ibl_c6474l/i2crom_le.map b/src/make/ibl_c6474l/i2crom_le.map
deleted file mode 100755 (executable)
index 154f70d..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-section 
-{
-  param_index   = 0
-  boot_mode     = 257
-  sw_pll               = 20
-  options       = 1
-
-  core_freq_mhz    = 1000
-  i2c_clk_freq_khz = 100
-
-  dev_addr_ext = 0x50
-
-  multi_i2c_id = 0
-  my_i2c_id    = 1
-  address_delay = 0
-  exe_file = "ibl_c6474l/ibl.i2c.le.ccs"
-}
-
diff --git a/src/make/ibl_c6474l/ibl.cmd b/src/make/ibl_c6474l/ibl.cmd
deleted file mode 100755 (executable)
index 1a320ed..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/************************************************************************************
- * FILE PURPOSE: Define the memory usage of the ibl module for the c6474
- ************************************************************************************
- * FILE NAME: ibl.cmd
- *
- * DESCRIPTION: The memory placement for the IBL is defined
- *
- ************************************************************************************/
-
-
-../main/c64x/make/iblmain.oc
-../device/c64x/make/c6474l.oc
-../ethboot/c64x/make/ethboot.oc
-../driver/c64x/make/net.oc
-../driver/c64x/make/arp.oc
-../driver/c64x/make/ip.oc
-../driver/c64x/make/udp.oc
-../driver/c64x/make/stream.oc
-../driver/c64x/make/timer.oc
-../driver/c64x/make/bootp.oc
-../driver/c64x/make/tftp.oc
-../hw/c64x/make/t64.oc
-../hw/c64x/make/cpmacdrv.oc
-../hw/c64x/make/pll.oc
-../hw/c64x/make/psc.oc
-../hw/c64x/make/emif31.oc
-../hw/c64x/make/mdio.oc
-../hw/c64x/make/i2c.oc
-../hw/c64x/make/sgmii.oc
-../interp/c64x/make/bis.oc
-../interp/c64x/make/cload.oc
-../interp/c64x/make/osal.oc
-../interp/c64x/make/btblwrap.oc
-../interp/c64x/make/btblpr.oc
-../interp/c64x/make/gem.oc
-../interp/c64x/make/blob.oc
-
-/* ../interp/c64x/make/dload.oc */
-/* ../interp/c64x/make/elfwrap.oc */
-/* ../interp/c64x/make/dlw_client.oc */
-/* ../interp/c64x/make/dload_endian.oc */
-/* ../interp/c64x/make/ArrayList.oc */
-
-/* ../nandboot/c64x/make/nandboot.oc */
-/* ../driver/c64x/make/nand.oc */
-/* ../ecc/c64x/make/3byte_ecc.oc */
-/* ../hw/c64x/make/gpio.oc */
-/* ../hw/c64x/make/nandgpio.oc */
-
--c
--stack 0x800
--heap  0x6000
-
-
-
-MEMORY
-{
-       TEXT   :  origin = 0x801000, length = 0x20000
-       STACK  :  origin = 0x821000, length = 0x0800
-       HEAP   :  origin = 0x821800, length = 0x6000
-       DATA   :  origin = 0x827800, length = 0x3000
-       CFG    :  origin = 0x831800, length = 0x0300
-       STAT :    origin = 0x831b00, length = 0x0200
-}
-
-SECTIONS
-{
-       .stack  > STACK
-       .sysmem > HEAP
-       .cinit  > TEXT
-       .const  > TEXT
-       .text   > TEXT
-       .switch > TEXT
-       .far    > DATA
-       .bss    > DATA
-
-    .ibl_config_table > CFG
-       .ibl_status_table > STAT
-
-}
-
index 592c2339d270256d55b82175fb748084c4a4c7ac..131edd4d75de17fe63d55d992b7daa9ed1a93eb7 100644 (file)
@@ -7,7 +7,7 @@
 #*
 #*  Usage:  make c6455 | c6472 | c6474 | c6474l | c6457 [DEBUG=yes] [ETH=no] [NAND=no]  \
 #*          [BIS=no] [COFF=no] [BLOB=no] [ELF=no] [ENDIAN= both | big | little] [I2C_BUS_ADDR= 0x50 | 0x51] \
-#*                     [COMPACT_I2C=yes]
+#*                     [COMPACT_I2C=yes] [I2C_SIZE_BYTES=..]
 #*******************************************************************************************
 
 IBLS_C6X= c6455 c6472 c6474 c6474l c6457
@@ -30,12 +30,13 @@ else
  endif
 endif
 
-# The i2c ROM bus address. The code will advance accross I2C bus address boundaries (the code must
-# be blocked so that a single block doesn't cross a boundary, however). 
-ifndef I2C_BUS_ADDR
- I2C_BUS_ADDR=0x50
+
+# The default i2c size. This is used only for the i2c writer utility
+ifndef I2C_SIZE_BYTES
+ I2C_SIZE_BYTES=0x20000
 endif
 
+
 # Excludes identify which components are not part of the build
 export EXCLUDES
 
@@ -45,10 +46,10 @@ all:
 
 
 be_target:
-       make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=big       I2C_BUS_ADDR=$(I2C_BUS_ADDR) $(TARGET)
+       make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=big    I2C_SIZE_BYTES=$(I2C_SIZE_BYTES) I2C_BUS_ADDR=$(I2C_BUS_ADDR) $(TARGET)
 
 le_target:
-       make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=little    I2C_BUS_ADDR=$(I2C_BUS_ADDR) $(TARGET)
+       make -f makestg2 ARCH=c64x TARGET=$(TARGET) ENDIAN=little I2C_SIZE_BYTES=$(I2C_SIZE_BYTES) I2C_BUS_ADDR=$(I2C_BUS_ADDR) $(TARGET)
 
 compare:
        make -f makestg2 ARCH=c64x TARGET=$(TARGET) compare
index 5061e85da88018d61ddf067ed91ea634258e24d4..623298df7818327cd011737b7617a33080d87039 100644 (file)
@@ -22,7 +22,7 @@ CLEAN_MODULES+=$(addprefix clean_,$(CFG_MODULES))
 TARGETS= c6472 c6474 c6474l c6455 c6457
 
 # The main module needs to know the device address of the i2c where the image map resides
-MAINDEFS=-DIBL_I2C_MAP_TABLE_DATA_BUS_ADDR=$(I2C_BUS_ADDR)
+MAINDEFS=-DIBL_CFG_I2C_MAP_TABLE_DATA_BUS_ADDR=$(I2C_BUS_ADDR)
 
 # Add build time exclusion definitions
 MAINDEFS+=$(addprefix -DEXCLUDE_,$(EXCLUDES))
@@ -30,7 +30,8 @@ MAINDEFS+=$(addprefix -DEXCLUDE_,$(EXCLUDES))
 
 # Common symbols are functions which are loaded with the stage load of the IBL, and
 # also referenced from the second stage
-COMMON_SYMBOLS= hwI2Cinit hwI2cMasterRead iblBootBtbl iblMalloc iblFree iblMemset iblMemcpy
+#COMMON_SYMBOLS= hwI2Cinit hwI2cMasterRead iblBootBtbl iblMalloc iblFree iblMemset iblMemcpy
+COMMON_SYMBOLS= iblBootBtbl iblMalloc iblFree iblMemset iblMemcpy
 
 ifeq ($(ENDIAN),little)
        HEX_OPT= -order L
@@ -153,7 +154,7 @@ utils:
        make -C $(IBL_ROOT)/util/btoccs
        make -C $(IBL_ROOT)/util/romparse TARGET=$(TARGET)
        make -C $(IBL_ROOT)/util/i2cRead  TARGET=$(TARGET) $(TARGET)
-       make -C $(IBL_ROOT)/util/i2cWrite TARGET=$(TARGET) $(TARGET)
+       make -C $(IBL_ROOT)/util/i2cWrite TARGET=$(TARGET) I2C_SIZE_BYTES=$(I2C_SIZE_BYTES) $(TARGET)
        make -C $(IBL_ROOT)/util/i2cConfig $(TARGET)
        make -C $(IBL_ROOT)/util/bconvert
 
@@ -169,13 +170,37 @@ hwClean:
        make -C $(IBL_ROOT)/hw/$(ARCH)/make cleant ARCH=$(ARCH) TARGET=$(TARGET)
        
 cleant:
+       rm -rf ibl_$(TARGET)/ibl_$(TARGET).be.out
+       rm -rf ibl_$(TARGET)/ibl_$(TARGET).le.out
+       rm -rf ibl_$(TARGET)/ibl_$(TARGET).be.map
+       rm -rf ibl_$(TARGET)/ibl_$(TARGET).le.map
+       rm -rf ibl_$(TARGET)/ibl_$(TARGET)_init.map
+       rm -rf ibl_$(TARGET)/ibl_$(TARGET)_init.out
+       rm -rf ibl_$(TARGET)/ibl_$(TARGET)_init.be.map
+       rm -rf ibl_$(TARGET)/ibl_$(TARGET)_init.be.out
+       rm -rf ibl_$(TARGET)/ibl_$(TARGET)_init.le.map
+       rm -rf ibl_$(TARGET)/ibl_$(TARGET)_init.le.out
        rm -rf ibl_$(TARGET)/ibl_$(TARGET).out
        rm -rf ibl_$(TARGET)/ibl_$(TARGET).map
        rm -rf ibl_$(TARGET)/ibl_le.b
        rm -rf ibl_$(TARGET)/ibl.b
        rm -rf ibl_$(TARGET)/ibl.i2c.b
-       rm -rf ibl_$(TARGET)/ibl.i2c.ccs
+       rm -rf ibl_$(TARGET)/ibl.i2c.be.ccs
+       rm -rf ibl_$(TARGET)/ibl.i2c.le.ccs
+       rm -rf ibl_$(TARGET)/ibl_init.i2c.be.ccs
+       rm -rf ibl_$(TARGET)/ibl_init.i2c.le.ccs
+       rm -rf ibl_$(TARGET)/ibl_init.le.ccs
+       rm -rf ibl_$(TARGET)/ibl_init.be.ccs
        rm -rf ibl_$(TARGET)/i2crom.ccs
+       rm -rf ibl_$(TARGET)/i2crom.dat
+       rm -rf ibl_$(TARGET)/i2crom_0x50.dat
+       rm -rf ibl_$(TARGET)/i2crom_0x51.dat
+       rm -rf ibl_$(TARGET)/i2crom.map.pp
+       rm -rf ibl_$(TARGET)/ibl_init_objs.inc
+       rm -rf ibl_$(TARGET)/ibl_init_symbols.inc
+       rm -rf ibl_$(TARGET)/ibl_objs.inc
+       rm -rf ibl_$(TARGET)/ibl_objs.pp
+       rm -rf ibl_$(TARGET)/ibl_objs.tmp
        
 
 
similarity index 50%
rename from src/cfg/c6474l/iblcfg.h
rename to src/nandboot/nandboot.h
index 9a5054eeb97d695d2a22167e54853a049d1a03f2..acbc9c8e6f773363c3e73b94b548b6f5e197786e 100644 (file)
  *
 */
 
-
-
-/**************************************************************************
- * FILE PURPOSE: Provide build time configurations for the IBL
- **************************************************************************
- * FILE NAME: iblcfg.h
- *
- * DESCRIPTION: Build time configuration
- *
- * @file iblcfg.h
+/**
+ * @file nandboot.h
  *
  * @brief
- *      Build time configurations for the c6474 Lite ibl are defined
- *
- ***************************************************************************/
-#ifndef IBLCFG_H
-#define IBLCFG_H
-
-/**
- * @brief  The maximum number of UDP sockets in the system
- */
-#define MAX_UDP_SOCKET          3
-
-
-/**
- * @brief The maximum number of timers in the system
- */
-#define MAX_TIMER_BLOCKS        5
-
-
-/**
- * @brief The size in bytes of the internal stream buffer
- */
-#define MAX_SIZE_STREAM_BUFFER  1024
-
-
-/**
- * @brief The maximum number of functions supported for BIS mode
+ *  Describes the ethernet wrapper used by IBL
  */
-#define MAX_BIS_FUNCTION_SUPPORT    3
 
+#ifndef NANDBOOT_H
+#define NANDBOOT_H
 
-/**
- * @brief No I/O sections accepted in boot table format
- */
-#define BOOTCONFIG_NO_BTBL_IO
+#include "types.h"
 
 /**
- * @brief The I2C bus address and data address of the ibl table.
- */
-#define IBL_I2C_DEV_FREQ_MHZ            1000
-#define IBL_I2C_CLK_FREQ_KHZ            100
-#define IBL_I2C_OWN_ADDR                10
-#define IBL_I2C_CFG_ADDR_DELAY          0x100       /* Delay between sending the address and reading data */
-
-#ifndef IBL_I2C_CFG_EEPROM_BUS_ADDR
- #define IBL_I2C_CFG_EEPROM_BUS_ADDR    0x50
-#endif
-
-#define IBL_I2C_CFG_TABLE_DATA_ADDR     (0x10000 - 0x300)
-
-/**
- * @brief No NAND support. Define the function call to be a void statement
+ *  @brief
+ *             Attempt a nand boot
+ *
+ *  @details 
+ *             The IBL will attempt to boot over the NAND interface
  */
-#define iblNandBoot()
+void iblNandBoot (void);
 
-/**
- * @brief No Elf support
- */
-#define iblIsElf(x)         FALSE
-#define iblBootElf(x,y)     for (;;);
 
+#endif /* NANDBOOT_H */
 
-#endif
 
 
index cdf4b4342a05e93154b3eddac338576173134492..1bb44daf94b0de1722b4571904e7f7a110368ccf 100644 (file)
@@ -201,8 +201,8 @@ void main (void)
 
     hwI2Cinit (ibl.pllConfig[ibl_MAIN_PLL].pllOutFreqMhz,  /* The CPU frequency during I2C data load */
                DEVICE_I2C_MODULE_DIVISOR,                  /* The divide down of CPU that drives the i2c */
-               IBL_I2C_CLK_FREQ_KHZ/8,                     /* The I2C data rate used during table load. Slowed for writes */
-               IBL_I2C_OWN_ADDR);                          /* The address used by this device on the i2c bus */
+               IBL_CFG_I2C_CLK_FREQ_KHZ/8,                 /* The I2C data rate used during table load. Slowed for writes */
+               IBL_CFG_I2C_OWN_ADDR);                      /* The address used by this device on the i2c bus */
 
 
     /* Compute the checksum over the ibl configuration structure */
index e48139262fc60f0ac912f5768e3bd3d809ad84d6..2bdfc802189cf3d599b0d4957b35ef5138da72f9 100644 (file)
@@ -54,7 +54,7 @@ endif
 export ENDIAN
 
 $(DEVICES):
-       make -f makestg2 ARCH=c64x TARGET=$@ $@
+       make -f makestg2 ARCH=c64x I2C_SIZE_BYTES=$(I2C_SIZE_BYTES) TARGET=$@ $@
 
 clean:
        make -f makestg2 clean2 ARCH=c64x
index 5a5e2291adc322c5c1ce7a0a9e921be25063fb16..f6e6576e63f3f347a1b19bec33ae473a3e24e011 100644 (file)
@@ -53,7 +53,9 @@
 #include <stdio.h>
 #include <string.h>
 
-#define I2C_SIZE_BYTES  0x20000
+#ifndef I2C_SIZE_BYTES
+ #define I2C_SIZE_BYTES  0x20000
+#endif
 
 /* Run time configuration */
 unsigned int   deviceFreqMhz = 1000;
index 6394b7ea03b8310b574ed6aeba465ce4b66fb2aa..f0921d820661aa0565253c40e8fa89e79e0ebf7c 100644 (file)
@@ -27,6 +27,8 @@ CLEAN_MODULES=$(addprefix clean_,$(MODULES))
 
 CSRC= i2cWrite.c
 
+CDEFS+= -DI2C_SIZE_BYTES=$(I2C_SIZE_BYTES)
+
 # enable debug info in the compile
 UTIL=yes
 
@@ -67,6 +69,6 @@ $(OBJS): cdefdep
 
 gen_cdefdep:
        @echo Checking command line dependencies
-       @echo $(ARCH) $(TARGET) > cdefdep.tmp
+       @echo $(ARCH) $(TARGET) $(I2C_SIZE_BYTES) > cdefdep.tmp
        @sh -c 'if diff -q cdefdep.tmp cdefdep ; then echo same ; else $(CP) cdefdep.tmp cdefdep ; fi '