From uclinux-dev Wed Mar 22 07:34:47 2006 From: "Falk Brettschneider" Date: Wed, 22 Mar 2006 07:34:47 +0000 To: uclinux-dev Subject: Re: [uClinux-dev] how to mount flash via jffs2 as dir /mnt ? Message-Id: <15420.1143012887 () www054 ! gmx ! net> X-MARC-Message: https://marc.info/?l=uclinux-dev&m=114301291107333 > --- Ursprüngliche Nachricht --- > Von: David McCullough > Jivin Falk Brettschneider lays it down ... > > > Von: David McCullough > > > Jivin Falk Brettschneider lays it down ... > > > > > Von: David McCullough > > > > > 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