This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Flash infrastructure rework
- From: Savin Zlobec <savin at elatec dot si>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Wed, 08 Sep 2004 14:24:49 +0200
- Subject: [ECOS] Flash infrastructure rework
Hi Andrew,
working with flash_v2 I've found two problems:
1) RedBoot's CYGNUM_REDBOOT_FLASH_BASE
is of flavor data with default value 0, so RedBoot will always
try to get flash info with cyg_flash_get_info_addr wich will
result in error if CYGNUM_REDBOOT_FLASH_BASE
is not set correctly. One possible solution would be to set its
flavor to booldata.
2) cyg_flash_erase/program/read loops have their condition set
to addr <= end_addr, many flash drivers calculate flash end address
as CYGNUM_FLASH_BASE+ (flash_dev_info->device_size * CYGNUM_FLASH_SERIES).
If the end address is not in the flash then erase/program/read ops
beyond the flash space can result in endless loops (the lower layer funs are
actually called with length = 0).
savin
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss