As I wrote in my last mail: "erase_sector_39sf020() is the erase routine you need to use in a loop." It is the (mostly) correct routine to use. Simply call it for every block to be erased. There is an equivalent routine for the 20sf040.
However, if you want instant gratification, replace erase_jedec() with erase_lhf00l04() or erase_82802ab(). Those two functions are even closer to the datasheet recommended values. In fact, with them everything should work out of the box, including sector protection.
Carl-Daniel, I don't just want to fix this for "instant gratification". I needs to be a perminant solution. I have alot of people waiting to beta-test the RCA RM4100 coreboot bios and work on the tv-out, but we need to get flashrom working for a fallback/updates first. I can test it with the "instant gratification" method but how to incorperate this into jedec.c so it doesn't interfear with other chips that use jedec.c???
Thanks - Joe