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] | |
> 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).
I decided that the end address should be the last valid address of the
flash, not the first invalid address. Attached (if i remember) is a
patch which makes all the v2 device drivers consistenly set this
correctly. Also the legacy driver interface now correctly sets the end
address. I also added code which checks the end address against the
block info when asserts are enabled.
This will require a minor change to your dataFlash driver. Would you
like me to commit the dataflash driver to the flash_v2 tree?
Andrew
Attachment:
flash_end.diff
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |