Re: [uClinux-dev] blkmem.c

From: D. Jeff Dionne (jeff@rt-control.com)
Date: Fri Jul 07 2000 - 19:09:28 EDT


Joe deBlaquiere <joe@wirespeed.com> said: 


> I'm using blkmem.c to allow me to access and rewrite the flash 
memory. It

> generally works very cleanly except that I couldn't figure out a 
nice way to

> define a memory block device to be sectored heterogeneously. 
I'm using an


blkmem, although it has some limited write capibility, is not good at 
this sort of thing.  Kenneth added the original FLASH write code for 
our SHGL platform in mid 1998, and it's an ugly hack (although a 
useful one),  This stuff will go away in favor of the JFFS code 
contributed by Axis for r/w FLASH. 

> AMD flash that has a mixture of 8k and 64k blocks. As a 
workaround, I


FLASH may have arbitrary block sizes in the general case, of 
course.  You'll need a sector map to do it right, and you'll have to 
read the device ID codes.  Problem is, you can't do that an execute 
out of the device at the same time (which is why the switch has not 
yet been competed to JFFS). 

> defined two block devices with the same origin. one has small 
blocks and one

> has big ones. This was good'nuff to get what I needed, but now 
I'm thinking

> about doing it right.

> 

> Am I missing something or is the current driver only for 
equal-sectored

> (monolithic, right?) devices?


blkmem.c is Kenneth's expanded version of my kmem.c to include a 
hack to allow one to update the underlying FLASH memory (for 
config and upgrade).  Greg has also done a bunch of work on it.  It 
really has no design goals beyond supporting (for write) that which 
was on the hardware at hand.

> 

> Has anybody done this already, or should I start?

> 


look at flash.c in 2.0.38.1pre7

Jeff

> Are there any other features I should be thinking about adding 
while I'm

> under the hood? lock/unlock sectors?

> 

> Joe deBlaquiere

> WireSpeed Communications

> 307 Wynn Drive

> Huntsville, AL 35805

> voice : 256-704-9257

> fax   : 256-837-3839

> 

> This message resent by the uclinux-dev@uclinux.org list server 
http://www.uClinux.org/

> 


  

 
This message resent by the uclinux-dev@uclinux.org list server http://www.uClinux.org/


This archive was generated by hypermail 2.1.4 : Thu Sep 19 2002 - 13:19:14 EDT