]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/ibl.git/blobdiff - src/util/romparse/romparse.h
c66x: corrected PREDIV and updated size limitations in utils
[keystone-rtos/ibl.git] / src / util / romparse / romparse.h
old mode 100644 (file)
new mode 100755 (executable)
index 1ab0c54..9b4ef62
@@ -1,3 +1,40 @@
+/*
+ *
+ * Copyright (C) 2010-2017 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.
+ *
+*/
+
+
+
 #ifndef _ROMPARSE_H
 #define _ROMPARSE_H
 /*************************************************************************************
@@ -9,7 +46,7 @@
  *                             table
  *
  *************************************************************************************/
+
 /* tiboot.h defines the boot parameters structure that will be created */
 #if defined(c6472)
  #include "tiboot_c6472.h"
  #include "tiboot_c6455.h"
 #elif defined(c6457)
  #include "tiboot_c6457.h"
+#elif defined(c66x)
+ #include "tiboot_c66x.h"
+#elif defined(c665x)
+ #include "tiboot_c665x.h"
+#elif defined(c66xk2x)
+ #include "tiboot_c66xk2x.h"
 #else
  #error invalid or missing device specification
 #endif
@@ -32,7 +75,7 @@
 /* Define a structure mapping the boot parameter table number to a program file
  * to an eeprom byte address */
 #define MAX_FNAME_LEN        132
-#define MAX_DATA_LEN_32bit   32768
+#define MAX_DATA_LEN_32bit   0x200000
 typedef struct {
   char fname[MAX_FNAME_LEN];
   int  sizeBytes;
@@ -61,23 +104,19 @@ typedef struct {
 } plt_t;
 
 /* Define a layout table. A layout table is a block of data which contains the addresses
- * of data files. Each address is 32 bits, with the upper 16 bits specifying the i2c 
+ * of data files. Each address is 32 bits, with the upper 16 bits specifying the i2c
  * id, the lower address the byte address of the 1st block in the table */
 #define MAX_LAYOUTS         2
 #define MAX_LAYOUT_FILES    8
 typedef struct  {
   int nPlt;                      /* Number of elements in the plt array */
   plt_t plt[MAX_LAYOUT_FILES];   /* Index of each file/pad in order */
-  
+
   unsigned int address;         /* I2c data address of the table */
   unsigned int dev_addr;        /* I2c device address of the table */
   int align;
 } layout_t;
 
-/* The i2c address masking is chosen to be 20 bits. This allows eproms to be stacked to use addresses
- * from 0x50 - 0x5f */
-#define I2C_ADDR_MASK   0x0fffff
-
 
 /* Pad section. The pad section creates a gap in the i2c memory map */
 #define MAX_PADS        8
@@ -95,7 +134,7 @@ typedef struct
 {
   int type;   /* Either PAD or LAYOUT */
   int index;  /* The array index for the pad/layout */
-  
+
 } padLayoutOrder_t;