The following patch needs to be applied to am29f040b.c in the utils/flash_and_burn directory:
---------------------- --- am29f040b-nv.c Wed Nov 5 14:33:34 2003 +++ am29f040b.c Wed Nov 5 14:20:26 2003 @@ -76,8 +76,8 @@ *(bios + 0x2AA) = 0x55; *(bios + 0x555) = 0x90;
- id1 = *(unsigned char *) bios; - id2 = *(unsigned char *) (bios + 0x01); + id1 = *(volatile unsigned char *) bios; + id2 = *(volatile unsigned char *) (bios + 0x01);
*bios = 0xF0;
----------------------
My C compiler was reordering the writes and reads, so that the flash wasn't ready to give an id when the reads occurred.
I notice that all the other flash devices already seem to have this correct.