
Details are as follows .. the flash size 16Mbyte Nor flash.. NAND flash 256MB. /* * Environment */
#if defined(CONFIG_NAND_U_BOOT) #define CFG_ENV_IS_IN_NAND 1 #define CFG_ENV_SIZE CFG_NAND_BLOCK_SIZE #define CFG_ENV_OFFSET ((1024<<10) - (CFG_NAND_BLOCK_SIZE<<1)) #elif !defined(CFG_RAMBOOT) #define CFG_ENV_IS_IN_FLASH 1 #define CFG_ENV_ADDR (CFG_MONITOR_BASE + 0x40000) //Daniel Change #define CFG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */ //Daniel Change #define CFG_ENV_SIZE 0x2000
/* * FLASH on the Local Bus */ #define CFG_FLASH_CFI /* use the Common Flash Interface */ #define CFG_FLASH_CFI_DRIVER /* use the CFI driver */ #define CFG_FLASH_BASE 0xFE000000 /* start of FLASH */ #define CFG_FLASH_SIZE 16 /* flash size in MB */ #define CFG_FLASH_EMPTY_INFO /* display empty sectors */ #define CFG_FLASH_USE_BUFFER_WRITE /* buffer up multiple bytes */
#define CFG_FLASH_BR_PRELIM (CFG_FLASH_BASE | /* flash Base address */ \ (2<<BR_PS_SHIFT) | /* 16 bit port size */ \ BR_V) /* valid */ #define CFG_FLASH_OR_PRELIM (0xFF000000 /* 16 MByte */ \ | OR_GPCM_XACS \ | OR_GPCM_SCY_9 \ | OR_GPCM_EHTR \ | OR_GPCM_EAD) /* 0xFF006FF7 TODO SLOW 16 MB flash size */ #define CFG_LBLAWBAR0_PRELIM CFG_FLASH_BASE /* window base at flash base */ #define CFG_LBLAWAR0_PRELIM 0x80000017 /* 16 MB window size */
#define CFG_MAX_FLASH_BANKS 1 /* number of banks */ #define CFG_MAX_FLASH_SECT 135 /* sectors per device */
#define CFG_FLASH_ERASE_TOUT 60000 /* Flash Erase Timeout (ms) */ #define CFG_FLASH_WRITE_TOUT 500 /* Flash Write Timeout (ms) */
#define CFG_MONITOR_BASE TEXT_BASE /* start of monitor */
/* Address and size of Redundant Environment Sector */
#else #define CFG_ENV_IS_NOWHERE 1 /* Store ENV in memory only */ #define CFG_ENV_ADDR (CFG_MONITOR_BASE - 0x1000) #define CFG_ENV_SIZE 0x2000 #endif
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */ #define CFG_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
-------------------------------------------------------------------------------
Michael Lawnick wrote:
rudresh said the following:
i'm using u-boot -1.3.0 in MPC8313 evaluation board, it having a NAND , NOR Flash , u-boot stored in NOR flash. when i do the saveenv , reset command the u-boot is erased. i'm not able to fix this issue. help me to fix this issue
Sounds U-Boot and environment share a flash sector. You'll have to give more info for correct diagnostic: Flash size, sector size, u-boot start address and size, position of environment data and if applicable of redundancy data.
-- Regards, Michael
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot