This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Non-contiguous flash with flashv2
- From: Andrew Lunn <andrew at lunn dot ch>
- To: Daniel Helgason <dhelgason at shaw dot ca>
- Cc: ecos-discuss at ecos dot sourceware dot org
- Date: Thu, 4 Dec 2008 07:33:25 +0100
- Subject: Re: [ECOS] Non-contiguous flash with flashv2
- References: <1228346350.3053.13.camel@localhost.localdomain>
> Take 2:
>
> If I define two flash drivers that share code, then each driver will
> have a single block_info that covers just the valid area:
>
> Driver 1
> - block_info[0] - program flash
> Driver 2
> - block_info[0] - boot flash
This is what was intended when i designed the API.
However, i did not think of your case, multiple FLASH devices hanging
off one controller.
The mutex is there to stop multiple threads accessing the same flash
device. That is still valid for you.
However the fact that there is one controller is hidden from the flash
API layer. You register two different devices. So your controller
mutex should be lower down. The device specific driver needs to
implement the mutex.
Andrew
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss