This is the mail archive of the ecos-discuss@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: Supporting Paged Flash in eCos/RedBoot


> Yes, I've already thought about this and have a plan (but no time to
> implement it)
> 
> FLASH 'writing' is already done via a function.  All we really need
> is a function to read data.
> 
> I'd much prefer if your FLASH driver provided a virtual address
> range (not virtual in the sense of MMU, just a range 0..N).  Then
> make the read/write/erase functions work on this virtual offset.
> They already work like this for everything except reading FLASH
> data.

'My' flash driver is just the strataflash driver, but working on paged
flash. So I should change the strataflash driver to work on offsets 0..N
into flash rather than raw memory addresses within flash
(FLASH_VIRT+0..N), and make sure that RedBoot etc use offsets into flash
rather than literal addresses -- which I think it will if the
get_flash_limits function returns 0..N, rather than FLASH_VIRT+(0..N).
Then I add a flash_read function and make sure redboot (and eCos) use
it. Sounds like a good plan.

Now in order to make the strataflash driver generic, I still need to
work out what the best way for the driver to access the physical device
is, in order to support linear and paged flash. The flash driver needs
to either implement paging itself in order to access the physical
device, or it needs to access the flash via the HAL which implements the
abstraction of the the flash device. I would suggest going via the HAL
using HAL_FLASH_READ/WRITE and friends. What do you think?

> The only other thing would be to identify the [very small] handful
> of places within RedBoot (or eCos) that access the FLASH directly.
> 
> Adding this support would also make it possible for RedBoot to
> use NAND flash without too much trouble.

At some point in the future I am going to have to try and get RedBoot to
understand a board which has a 1M AMD boot flash and a 64M strataflash
data partition. I suspect/hope this work will make that a whole lot
easier as well... 

Ian.
-- 
Ian Campbell
Design Engineer

Arcom Control Systems Ltd,			Direct: +44 (0)1223 403465
Clifton Road,					Phone:  +44 (0)1223 411 200
Cambridge CB1 7EA				E-Mail: icampbell@arcom.com
United Kingdom					Web:    http://www.arcom.com




________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________

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


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