From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] Problem using cfi_flash driver for s29GL512N flashes
Date: Wed, 28 Nov 2007 07:23:14 +0100 [thread overview]
Message-ID: <200711280723.15072.sr@denx.de> (raw)
In-Reply-To: <16271F716C971E4BBBE29C45FA4A013805E0146F@mtw01ex01.mindtree.com>
Hi Santi Gopal,
On Tuesday 27 November 2007, Santigopal Mondal wrote:
> Thanks for your help. The same problem remains with the upgraded version
> also.
>
> Is it something to do with the TEXT_BASE. The probelm is the data for
> environment is written to flash properly. But when it checks for crc in
> env_init() the crc32 function fails. the env_ptr->crc is correct.
>
> The environment sector when allocated in malloc area in main memory seems
> to get corrupted because the crc field does not seem to be correct.
>
>
> the Ram is 32 MB
> TEXT_BASE 21F00000
> CFG_GBL_DATA_SIZE 128
> CFG_ENV_ADDR (CFG_FLASH_BASE + 0x20000)
> CFG_ENV_SIZE 0x2000
> CFG_ENV_SECT_SIZE 0x20000
> CONFIG_STACKSIZE (32 * 1024)
> CFG_MALLOC_LEN (CFG_ENV_SIZE + 128*1024)
Here the CFI settings I currently use on some AMCC eval boards like
sequoia.h:
#define CFG_FLASH_BASE 0xfc000000 /* start of FLASH */
#define CFG_MONITOR_LEN (384 * 1024) /* Reserve 384 kB for Monitor */
/*-----------------------------------------------------------------------
* FLASH related
*----------------------------------------------------------------------*/
#define CFG_FLASH_CFI /* The flash is CFI compatible */
#define CFG_FLASH_CFI_DRIVER /* Use common CFI driver */
#define CFG_FLASH_BANKS_LIST { CFG_FLASH_BASE }
#define CFG_MAX_FLASH_BANKS 1 /* max number of memory banks */
#define CFG_MAX_FLASH_SECT 512 /* max number of sectors on one chip */
#define CFG_FLASH_ERASE_TOUT 120000 /* Timeout for Flash Erase (in ms) */
#define CFG_FLASH_WRITE_TOUT 500 /* Timeout for Flash Write (in ms) */
#define CFG_FLASH_USE_BUFFER_WRITE 1 /* use buffered writes (20x faster) */
#define CFG_FLASH_PROTECTION 1 /* use hardware flash protection */
#define CFG_FLASH_EMPTY_INFO /* print 'E' for empty sector on flinfo */
#ifdef CFG_ENV_IS_IN_FLASH
#define CFG_ENV_SECT_SIZE 0x20000 /* size of one complete sector */
#define CFG_ENV_ADDR ((-CFG_MONITOR_LEN)-CFG_ENV_SECT_SIZE)
#define CFG_ENV_SIZE 0x2000 /* Total Size of Environment Sector */
/* Address and size of Redundant Environment Sector */
#define CFG_ENV_ADDR_REDUND (CFG_ENV_ADDR-CFG_ENV_SECT_SIZE)
#define CFG_ENV_SIZE_REDUND (CFG_ENV_SIZE)
#endif
Please note that on these PPC4xx platforms, U-Boot is located at the *end*
of the FLASH, since the reset vector has to be at 0xfffffffc. So with an
U-Boot image size of 0x60000 the location is 0xfffa0000...0xffffffff.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
prev parent reply other threads:[~2007-11-28 6:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-27 4:46 [U-Boot-Users] Problem using cfi_flash driver for s29GL512N flashes santigopal_mondal at mindtree.com
2007-11-27 6:11 ` Stefan Roese
2007-11-27 20:48 ` Santigopal Mondal
2007-11-28 6:23 ` Stefan Roese [this message]
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=200711280723.15072.sr@denx.de \
--to=sr@denx.de \
--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.