Carl-Daniel Hailfinger wrote:
{"W29C011", WINBOND_ID, W_29C011, 128, 128, ...}
should rather read
{"Winbond", "W29C011", 0xda, 0xc1, 128, 128, ...}
I like it.
Please don't change this unless you are willing to add support for all chips mentioned in a #define to flashchips.c. That of course includes testing. Right now flash.h is an ID database which helps greatly if you need to look up an unsupported ID which is already known. Unfortunately no search engine is able to find data sheets based on the ID, so the flash.h database is absolutely essential.
I don't understand. Essential for what exactly?
Heaping up a whole lot of unsupported IDs actually makes the code even harder to understand, which is why i suggested to drop it in the first place.
I think maintaining this list, eh, "database", in form of preprocessor defines is a waste of time.
If we are concerned about keeping databases, let's lend some of the design I put into /dev/bios in 1994 and put a "supported?" flag into the array in flashchips.c. This way we can identify all kinds of chips and give the user a hint that we did not have the opportunity to test the chip (properly). Anticipating from flashrom -V to searching flash.h to getting a datasheet to actually support the chip is a long way and there are obviously many better attempts to provide such help, if we feel it is necessary.
Stefan