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


Hi,

Attached is a rough first draft of a patch to implement an improved
flash interface -- It's a first pass and I certainly wouldn't expect you
to apply it as is...

The main bulk of the patch modifies the API of cyg/io/flash.h such that
each function takes a struct flash_info * as it's first parameter and
all addresses are described as unsigned long offsets rather than literal
addresses. I have added flash_read as well. It also modifies the redboot
flash support to use the new API as well as the strataflash driver.

I have tested the modified strata flash driver, and fis and fconfig seem
to work OK, either separatly or using the combined fis and config CDL
option. I haven't got the readonly fallback working as yet. The strata
flash changes also make use of FLASH_READ and FLASH_WRITE macros, but
these are just an interim solution to support paged flash and are mostly
orthogonal to the issue of improving the flash API.

Older drivers which do not define the CYGHWR_IO_FLASH_DEVICE_V2 symbol
should still work just fine. I was able to compile RedBoot for one of
our other boards which has linear AMD flash and another which uses the
intel/28fxxxx driver but I haven't had a chance to actually run either
yet.

There's quite a few rough edges, but I hope you can see the general path
I am taking. Eventually I would like to add a Flash device table (like
the net device table) and add a flash_open("string") command to get the
flash_info pointer.

So, comments?

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 at arcom dot 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
________________________________________________________________________

Attachment: flash.diff
Description: Text document

-- 
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]