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: JFFS2 sucess! (RE: JFFS2, for Redboot only?)


Dirk Broer wrote:

I modified flashiodev_init() to unlock the part of the flash that was in question. Could someone suggest a better place? The file in particular is in the ECOS distribution - seems wrong to modify it there.

At the start of your application before you call mount.


One issue remains, since our device was never intended for constant reads
and writes the flash is at address 0.  The problem is during writes we need
to disable interrupts so that interrupt vector lookup won't happen.  Can't
afford the time that a large flash write will take.  Seems the Intel flash
driver has some provisions for a word by word write.  Essentially write a
word, reset flash, read a word.  I think I can get away with bracketing
this - need to ask the hardware guys about this.

You can only erase a page at a time, and that's one of the slowest operations - on some parts it can be about 1s.


Besides, you don't want to write word by word. I vaguely recall that programming a word doesn't take a very different time from programming a whole block.

Could make the code generic:  If interrupt_vector_table is in active flash,
disable interrupts during write/erase.

What CPU is this? Can you not remap the interrupt vector table or flash away from 0?


Or if you're prepared to change some of the cache manipulation code in the flash driver, you could lock the interrupt vector table into cache and leave the cache enabled. All depends on your CPU whether this is possible.

There's probably more answers to this if I thought about it more.

So..... does JFFS2 buffer writes? Any provision for async completion?

It doesn't do either in eCos. Of course this can be solved by separating the I/O operations from the rest of the system in your application by doing I/O in different threads.


Thanks Andrew Lunn and Gary Thomas

No offence to them, but thanks moreover to 3G Lab (now Trigenix) who did the initial eCos port.


Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
>>>>> Visit us in booth 2527 at the Embedded Systems Conference 2004 <<<<<
March 30 - April 1, San Francisco http://www.esconline.com/electronicaUSA/
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine


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


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