[prev in list] [next in list] [prev in thread] [next in thread] 

List:       uclinux-dev
Subject:    Re: [uClinux-dev] how to mount flash via jffs2 as dir /mnt ?
From:       "Falk Brettschneider" <falk.brettschneider () gmx ! de>
Date:       2006-03-22 7:34:47
Message-ID: 15420.1143012887 () www054 ! gmx ! net
[Download RAW message or body]

> --- Ursprüngliche Nachricht ---
> Von: David McCullough <david_mccullough@au.securecomputing.com>
> Jivin Falk Brettschneider lays it down ...
> > > Von: David McCullough <david_mccullough@au.securecomputing.com>
> > > Jivin Falk Brettschneider lays it down ...
> > > > > Von: David McCullough <david_mccullough@au.securecomputing.com>
> > > > > Well, I committed it,  but it came in with the import of
linux-2.4.21.
> > > > > 
> > > > > The commit log probably says something about the import of 2.4.21.
> > > > > 
> > > > > The comment in the code explains it IMO:
> > > > > 
> > > > >         /* In cfi_amdstd_write() we frob the protection stuff
> > > > >           without paying any attention to the state machine.
> > > > >           This upsets in-progress erases. So we turn this flag
> > > > >           off for now till the code gets fixed. */
> > > > I read it but wonder what it means. How can an erase be in-progress
> > > during a
> > > > write? Does it mean two accesses from different threads? Having it
> > > > single-threaded, AFAIK one can poll a status bit for the completion
> of a
> > > > flash action, am I really right (?)...
> > > 
> > > Ok,  I could easily be wrong on this,  but it looks like the code is
> > > unlocking the chip directly in the code instead of using the standard
> > > MTD mechanisms for it.
> > > 
> > > And yes,  you can have processes writing to flash while others are
> > > reading from it.  MTD deals with all this quite well via it's locking
> > > mechanisms,  thus by passing it in any way would be bad,
> >
> > Since in my system only one user app uses the flash (in one single
> thread).
> > Is it OK to enable fast programming mode for this special case?
> 
> Do you have anything else running out of flash ?  Accessing flash in any
> way ?  A filesystem ?  A config reader ?
Just jffs2.

> 
> MTD does all it's flash work with interrupts enabled and other processes
> are free to do as they please.  This includes trying to execute from
> flash,  or just access it for something.
> 
> If all your filesystems are in RAM,  and no one other than the process
> writing to flash even knows that flash exists you may be ok,  but I
> won't promise that and personally would leave it as is ;-)
The only thing I'm not sure of is if Linux has e.g. a background daemon
doing flash synchronizations delayed, that could happen during the same time
as my process wants to access the flash.

> 
> Cheers,
> Davidm
Thanks for your help, David.

Cheers, F@lk

-- 
Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer
_______________________________________________
uClinux-dev mailing list
uClinux-dev@uclinux.org
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by uclinux-dev@uclinux.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic