[ECOS] Flash infrastructure rework

Jani Monoses jani@iv.ro
Wed Aug 4 12:54:00 GMT 2004


Hi Andrew

just two small comments after a quick glance.

> #ifdef CYGPKG_KERNEL
> __externC int cyg_flash_mutex_lock(const cyg_flashaddr_t from, 
>                                    const size_t len);
> __externC int cyg_flash_mutex_unlock(const cyg_flashaddr_t from, 
> #endif

could use the cyg_drv_mutex API so that even in non-kernel configs such as
redboot, the flash driver is safe from interrupts. This just happened to us:
with interrupts enabled in redboot, flash operations hung sometimes.

> // Structure of pointers to functions in the device driver
> struct cyg_flash_dev_funs {
[...]
>   int (*flash_hwr_map_error) (struct cyg_flash_dev *dev, int err);
>                             

should this be exposed? It looks like it is used after program/erase etc to
convert the stat already returned. Drivers should already return 'normal'
flash errors IMHO.

Also what do you and the other maintainers think of converting the actual
flash code to the cyg_ namespace soon? That way your patch too would have
less differences, and drivers would be easier to adapt to the new API.

Jani

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list