]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
83xx: fix CFG_ENV_ADDR and CFG_ENV_SECT_SIZE definitions
authorTimur Tabi <timur@freescale.com>
Mon, 5 Nov 2007 15:34:06 +0000 (09:34 -0600)
committerKim Phillips <kim.phillips@freescale.com>
Tue, 8 Jan 2008 15:55:39 +0000 (09:55 -0600)
Fix the definitions of CFG_ENV_ADDR and CFG_ENV_SECT_SIZE for all of the
currently-defined 83xx boards.  This change guarantees that the environment
will be located on the first flash sector after the U-Boot image.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
include/configs/MPC8313ERDB.h
include/configs/MPC8323ERDB.h
include/configs/MPC832XEMDS.h
include/configs/MPC8349EMDS.h
include/configs/MPC8349ITX.h
include/configs/MPC8360EMDS.h

index 6568fe13b85b5743db8823bf4a24ead7cc00bf67..0c3bc16c9cbbd0f8b78806cab24bf62ec0835e61 100644 (file)
 #define CFG_GBL_DATA_OFFSET    (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
 #define CFG_INIT_SP_OFFSET     CFG_GBL_DATA_OFFSET
 
+/* CFG_MONITOR_LEN must be a multiple of CFG_ENV_SECT_SIZE */
 #define CFG_MONITOR_LEN                (256 * 1024)    /* Reserve 256 kB for Mon */
 #define CFG_MALLOC_LEN         (512 * 1024)    /* Reserved for malloc */
 
  */
 #ifndef CFG_RAMBOOT
        #define CFG_ENV_IS_IN_FLASH     1
-       #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + 0x40000)
+       #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
        #define CFG_ENV_SECT_SIZE       0x10000 /* 64K(one sector) for env */
        #define CFG_ENV_SIZE            0x2000
 
index 376973b94da0b06e4b7570c31a982e25112a1810..558f94bb77aaf3a497927c22ee4b12e93b166a50 100644 (file)
 #undef  CFG_RAMBOOT
 #endif
 
+/* CFG_MONITOR_LEN must be a multiple of CFG_ENV_SECT_SIZE */
 #define CFG_MONITOR_LEN                (256 * 1024)    /* Reserve 256 kB for Mon */
 #define CFG_MALLOC_LEN         (128 * 1024)    /* Reserved for malloc */
 
  */
 #ifndef CFG_RAMBOOT
        #define CFG_ENV_IS_IN_FLASH     1
-       #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + 0x40000)
-       #define CFG_ENV_SECT_SIZE       0x40000 /* 256K(one sector) for env */
+       #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
+       #define CFG_ENV_SECT_SIZE       0x20000
        #define CFG_ENV_SIZE            0x2000
 #else
        #define CFG_NO_FLASH            1       /* Flash is not usable now */
index c9c6d88cf01f490c393d74282cb57fa89adc17a7..5345fc62f80ce9471915840b04077da5867f5f47 100644 (file)
 #undef  CFG_RAMBOOT
 #endif
 
+/* CFG_MONITOR_LEN must be a multiple of CFG_ENV_SECT_SIZE */
 #define CFG_MONITOR_LEN                (256 * 1024)    /* Reserve 256 kB for Mon */
 #define CFG_MALLOC_LEN         (128 * 1024)    /* Reserved for malloc */
 
  */
 #ifndef CFG_RAMBOOT
        #define CFG_ENV_IS_IN_FLASH     1
-       #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + 0x40000)
-       #define CFG_ENV_SECT_SIZE       0x40000 /* 256K(one sector) for env */
+       #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
+       #define CFG_ENV_SECT_SIZE       0x20000
        #define CFG_ENV_SIZE            0x2000
 #else
        #define CFG_NO_FLASH            1       /* Flash is not usable now */
index 92555bac42245d37e0eda1e840fd40ae30cf99cb..7d5b17b50b1792d3899173731094afb0910eb2e5 100644 (file)
  */
 #ifndef CFG_RAMBOOT
        #define CFG_ENV_IS_IN_FLASH     1
-       #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + 0x40000)
+       #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
        #define CFG_ENV_SECT_SIZE       0x20000 /* 128K(one sector) for env */
        #define CFG_ENV_SIZE            0x2000
 
index 54cab528bde3fea1919fa03f08b0cb3908c3049e..2a2e753c87d4a53dc81ab9acebbbc6b590946873 100644 (file)
@@ -261,6 +261,7 @@ boards, we say we have two, but don't display a message if we find only one. */
 #define CFG_GBL_DATA_OFFSET    (CFG_INIT_RAM_END - CFG_GBL_DATA_SIZE)
 #define CFG_INIT_SP_OFFSET     CFG_GBL_DATA_OFFSET
 
+/* CFG_MONITOR_LEN must be a multiple of CFG_ENV_SECT_SIZE */
 #define CFG_MONITOR_LEN                (256 * 1024) /* Reserve 256 kB for Mon */
 #define CFG_MALLOC_LEN         (128 * 1024) /* Reserved for malloc */
 
@@ -404,8 +405,8 @@ boards, we say we have two, but don't display a message if we find only one. */
 
 #ifndef CFG_RAMBOOT
   #define CFG_ENV_IS_IN_FLASH
+  #define CFG_ENV_ADDR         (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
   #define CFG_ENV_SECT_SIZE    0x10000 /* 64K (one sector) for environment */
-  #define CFG_ENV_ADDR         (CFG_MONITOR_BASE + (4 * CFG_ENV_SECT_SIZE))
   #define CFG_ENV_SIZE         0x2000
 #else
   #define CFG_NO_FLASH         /* Flash is not usable now */
index 41f062ce72e3937f57f72e1eb38b931bbaba3fec..8098951c5b98450c24af91799095e4678936be87 100644 (file)
 #undef CFG_RAMBOOT
 #endif
 
+/* CFG_MONITOR_LEN must be a multiple of CFG_ENV_SECT_SIZE */
 #define CFG_MONITOR_LEN                (256 * 1024) /* Reserve 256 kB for Mon */
 #define CFG_MALLOC_LEN         (128 * 1024) /* Reserved for malloc */
 
 
 #ifndef CFG_RAMBOOT
        #define CFG_ENV_IS_IN_FLASH     1
-       #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + 0x40000)
-       #define CFG_ENV_SECT_SIZE       0x40000 /* 256K(one sector) for env */
+       #define CFG_ENV_ADDR            (CFG_MONITOR_BASE + CFG_MONITOR_LEN)
+       #define CFG_ENV_SECT_SIZE       0x20000
        #define CFG_ENV_SIZE            0x2000
 #else
        #define CFG_NO_FLASH            1       /* Flash is not usable now */