Hello Carl-Daniel,
Carl-Daniel Hailfinger wrote:
Hi Arjen,
thanks for your patch and the detailed analysis. Could you reply to this mail with a Signed-off-by statement as explained in http://www.coreboot.org/Development_Guidelines#Sign-off_Procedure ? That will allow us to commit your patch. Thanks.
The patch has been attached...
The MX29F040C data sheet says: "Address bit A11~A18=X=Don't care for all address commands except...program". That means as long as the low 10 bits of your command addresses are 0x2AA/0x555, the upper bits are ignored.
The MX29F040C data sheet I downloaded (REV. 2.0, MAY. 26, 2009) doesn't contain that information. I've found another datasheet for the MX29F040 (REV. 2.3, DEC. 10, 2004) that confirms what you wrote (only the 11 lowest bits are used).
If would be very interesting to see if probe_jedec works for your chip. AFAICS it should, but you may need to change the timing definition to TIMING_ZERO (at least the data sheet suggests that). If it works, probe_jedec is definitely preferable.
It works.
With probe_timing = TIMING_IGNORED: # ./flashrom -V flashrom v0.9.0-r605 No coreboot table found. Found chipset "VIA VT8237", enabling flash write... OK. Calibrating delay loop... 633M loops per second, 100 myus = 163 us. OK. .... Probing for Macronix MX29F040C, 512 KB: Chip lacks correct probe timing information, using default 10mS/40uS probe_jedec: id1 0xc2, id2 0xa4 Found chip "Macronix MX29F040C" (512 KB) at physical address 0xfff80000. .... No operations were specified.
With probe_timing = TIMING_ZERO: # ./flashrom -V flashrom v0.9.0-r605 No coreboot table found. Found chipset "VIA VT8237", enabling flash write... OK. Calibrating delay loop... 631M loops per second, 100 myus = 162 us. OK. .... Probing for Macronix MX29F040C, 512 KB: probe_jedec: id1 0xc2, id2 0xa4 Found chip "Macronix MX29F040C" (512 KB) at physical address 0xfff80000. .... No operations were specified.
To summarize:
- Please test with probe_jedec as detailed above.
- Your choice which write/erase function to pick.
I've chosen the 29f040b functions, because the addresses match those in the datasheet. This should be less confusing. Programming will be slower, but you explained that's only temporarily.