Flash infrastructure rework

Savin Zlobec savin@elatec.si
Tue Sep 28 10:09:00 GMT 2004


Andrew Lunn wrote:

>>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?
>  
>
Hi Andrew,

thanx for the changes - I'll fix the dataflash driver and test it.
I intend to slightly change the dataflash API, so its best to
hold off the commit till this gets done.

savin



More information about the Ecos-patches mailing list