Bug in am29f040b.c causes flash device not to be recognised
Peter Fox
peter.fox at aeroflex.com
Wed Nov 5 09:26:01 CET 2003
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.
--
Peter Fox <peter.fox at aeroflex.com> Aeroflex Test Solutions
Principal Design Engineer Stevenage
Any opinions expressed above are http://www.aeroflex.com/
not necessarily those of Aeroflex. Tel: + 44 (0) 1438 742200
More information about the coreboot
mailing list