This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Flash infrastructure rework


On Wed, Sep 08, 2004 at 02:24:49PM +0200, Savin Zlobec wrote:
> 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.

As you suggested, i turned this into a booldata. See patch attached.

> 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).

Humm, not sure what to do about this. I would say the drivers are
broken since they are return end+1. I might change the legacy device
driver API to check for end addresses for & 0xffff =- 0x0 and if so
subtract one.

        Andrew 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]