Common Flash Interface probe code

Reynolds-Lear, Matthew m.reynolds-lear at fusiondigitec.com
Tue Jul 6 03:45:50 EDT 2004


Hi,
I've written a flash driver based on CFI.  It was going so well until I
needed to detect if a device was top or bottom boot.
 
Basically, from looking at different manufacturer datasheets, I am
totally lost as to the correct approach to determining if a device is
top or bottom boot, and if the CFI device's geometry data is presented
in a different order depending if the device is top or bottom boot. 
 
As I see it, here are my issues:
 
1) I could determine if a device is top or bottom boot by reading the
private vendor specific table in the CFI.  However, it seems that this
table is not standardised and each manufacturer has their own version of
it.  Because the CFI indicates what algorithm can be used to perform
operations on the device, you shouldn't have to check the device ID etc
to determine anything about it - thus the idea behind the CFI.  It seems
though that each manufacturer can put slightly different data in the
private table so to find out exactly you'd need to read it's
manufacturer ID.  When you've done this you might as well have done a
JEDEC probe!
 
2) Some manufacturers (e.g. AMD) don't even indicate in their private
table if the device is top or bottom boot so how are users of the CFI
supposed to find out apart from fetching the ID and looking it up in
some sort of table (again, the CFI was intended to remove having to do
this)?
 
3) From reading some datasheets, some devices present their device
geometry CFI data differently if the device is top or bottom boot.
Thing is, other datasheets indicate that some devices do not do this.  
 
Basically, I want to avoid having to read the device's ID to determine
if it is top or bottom boot and what its sector map is since this
involves keeping a flash driver look up table up to date and drop in
replacement of flash devices won't be possible without updating this
table.  It seems that some device's CFI data in the private table will
do this tell me if it is top or bottom boot but the format of the table
is completely specific to the manufacturer (so I'd have to check the
manufacturer ID anyway) but other device's CFI data doesn't provide this
information so how are we supposed to know?!
 
I've seen a few postings related to this problem and can't find anything
'solid' which will assist.
 
Can anyone help?  It's all a bit frustrating.
 
Many thanks.
  Matt
-- 




More information about the linux-mtd mailing list