jedec_probe_chip error?
in Linux-MTD:
I'm looking at mtd/drivers/chips/jedec_probe.c:jedec_probe_chip line 794 from current CVS.
for CFI_DEVICETYPE_X8, the unlock1 and unlock2 values
seem wrong. They're currently 0x555 and 0x2aa, resp.
Does it work like this? All of the small (512KiB - 128KiB) devices I've read the datasheets for, require 0x5555 and 0x2aaa here. Are there any devices which use the current code's values?
Also, I have discovered (see prev. post) at least one device that doesn't respond to the aa 55 90 sequence, requiring an alternate "old" sequence instead. Any guidance on the best way to implement this generically would be appreciated.
Jeremy
Quoted 8 lines · Jeremy Jackson
in Linux-MTD:
I'm looking at mtd/drivers/chips/jedec_probe.c:jedec_probe_chip line 794 from current CVS.
for
CFI_DEVICETYPE_X8, the unlock1 and unlock2 values
seem wrong. They're currently0x555and0x2aa, resp.
Does it work like this?
Unless it's changed since I last looked the code auto detects whether it should use 0x555/0x2aa or 0x5555/0x2aaa. If one variant doesn't work it then tries the other.
Quoted 4 lines
All of the small (512KiB -
128KiB) devices I've read the datasheets for, require0x5555and0x2aaahere. Are there any devices which use the current code's values?
Yes. I believe it is SST that is the odd man out in this regard.
Quoted 4 lines
Also, I have discovered (see prev. post) at least one device that doesn't respond to the aa 55 90 sequence, requiring an alternate "old" sequence instead. Any guidance on the best way to implement this generically would be appreciated.
My hunch is to try the very old sequence last, if the newer sequences do not work. In the worst case you will have to write your own probe routine. But I suspect Jedec probe can stretch a little more.
Eric
Quoted 4 lines · Jeremy Jackson
Also, I have discovered (see prev. post) at least one device that doesn't respond to the aa 55 90 sequence, requiring an alternate "old" sequence instead. Any guidance on the best way to implement this generically would be appreciated.
There's 3 different methods used by flash devices to identify themselfes.
aa 55 90 is the most used one. Others (i.e. some Winbonds) need aa 55 80 aa 55 60, whereas the third method (some other winbonds) is aa 55 80 aa 55 20.
As far as I could estimate, the order in which you probe is crucial. Some chips answer to aa 55 80 aa 55 60 or aa 55 80 aa 55 20 with their protection map instead of their id.
Eon Flashchips don't put their device id to 0x01, but to 0x101. 0x00 and 0x01 contain the vendor id (0x7f)
/dev/bios does that part of the probing pretty ok. I suggest you have a look at programming.c:flash_probe_address()
get /dev/bios from the OpenBIOS cvs tree:
http://www.freiburg.linux.de/OpenBIOS/dev/cvs.html
Best regards,
Stefan Reinauer
Signature · 4 lines
Ok hex 4666 dup negate do i 4000 dup 2* negate do " *" 0 dup 2dup 1e 0 do
2swap * e >>a 2* 5 pick + -rot - j + dup dup * e >>a rot dup dup * e >>a
rot swap 2dup + 10000 > if 3drop 3drop " " 0 dup 2dup leave then loop
2drop 2drop type 268 +loop cr drop 5de +loopQuoted 4 lines · Stefan Reinauer
get
/dev/biosfrom the OpenBIOS cvs tree:
http://www.freiburg.linux.de/OpenBIOS/dev/cvs.html
The Readme lists that this should work under a 2.2.x kernel, however I get serveral errors trying to compile with 2.2.19
Things like:
structure has no member nameed 'resource'
'PCI_ROM_RESOURCE' undeclared
Does it sill work with 2.2.x?
I'm using the latest tarball from the above link. I was unable to get a CVS copy as it kept complaining that 'anonymous' was an unknown user.
--
Richard A. Smith Bitworks, Inc.
[email protected] 501.846.5777 x204
Sr. Design Engineer http://www.bitworks.com
Quoted 5 lines · Richard A. Smith
Quoted 2 lines
get
/dev/biosfrom the OpenBIOS cvs tree:
http://www.freiburg.linux.de/OpenBIOS/dev/cvs.htmlThe Readme lists that this should work under a 2.2.x kernel, however I get serveral errors trying to compile with 2.2.19
[..]
Quoted 1 line
Does it sill work with 2.2.x?
Oops. I dropped 2.2 support with one of the last releases. It is tested under 2.4 - backporting it shouldnt be too hard - drop me a note if 2.4 is not an option for you.
Quoted 3 lines
I'm using the latest tarball from the above link. I was unable to get a CVS copy as it kept complaining that 'anonymous' was an unknown user.
Hmm... I'll check into that asap.
Best regards,
Stefan Reinauer
Signature · 4 lines
Ok hex 4666 dup negate do i 4000 dup 2* negate do " *" 0 dup 2dup 1e 0 do
2swap * e >>a 2* 5 pick + -rot - j + dup dup * e >>a rot dup dup * e >>a
rot swap 2dup + 10000 > if 3drop 3drop " " 0 dup 2dup leave then loop
2drop 2drop type 268 +loop cr drop 5de +loop