From: rudresh <rudresh.tk@lntemsys.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] saveenv command erases flash u-boot
Date: Mon, 23 Feb 2009 03:40:41 -0800 (PST) [thread overview]
Message-ID: <22159964.post@talk.nabble.com> (raw)
In-Reply-To: <gntln2$bue$1@ger.gmane.org>
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@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 at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>
--
View this message in context: http://www.nabble.com/saveenv-command-erases-flash-u-boot-tp22156928p22159964.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
next prev parent reply other threads:[~2009-02-23 11:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-23 7:56 [U-Boot] saveenv command erases flash u-boot rudresh
2009-02-23 8:11 ` Michael Lawnick
2009-02-23 11:40 ` rudresh [this message]
2009-02-23 12:24 ` Michael Lawnick
2009-02-23 9:34 ` Wolfgang Denk
2009-02-23 11:46 ` rudresh
2009-02-23 12:04 ` Wolfgang Denk
2009-02-24 9:09 ` Norbert van Bolhuis
2009-02-24 9:56 ` Frank Svendsbøe
2009-02-24 11:46 ` rudresh
2009-02-24 12:01 ` Norbert van Bolhuis
2009-02-24 13:07 ` Frank Svendsbøe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22159964.post@talk.nabble.com \
--to=rudresh.tk@lntemsys.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.