Changeset 3602
- Timestamp:
- 09/26/08 15:19:02 (3 months ago)
- Location:
- trunk/util/flashrom
- Files:
-
- 4 modified
-
Makefile (modified) (1 diff)
-
en29f002a.c (modified) (3 diffs)
-
flash.h (modified) (1 diff)
-
flashchips.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/util/flashrom/Makefile
r3431 r3602 27 27 OBJS = chipset_enable.o board_enable.o udelay.o jedec.o stm50flw0x0x.o \ 28 28 sst28sf040.o am29f040b.o mx29f002.o sst39sf020.o m29f400bt.o \ 29 w49f002u.o 82802ab.o pm49fl00x.o sst49lf040.o \29 w49f002u.o 82802ab.o pm49fl00x.o sst49lf040.o en29f002a.o \ 30 30 sst49lfxxxc.o sst_fwhub.o layout.o cbtable.o flashchips.o \ 31 31 flashrom.o w39v080fa.o sharplhf00l04.o w29ee011.o spi.o it87spi.o \ -
trunk/util/flashrom/en29f002a.c
r3030 r3602 20 20 21 21 /* 22 EN29F512 has 1C,2123 EN29F010 has 1C,2024 EN29F040A has 1C,0425 EN29LV010 has 1C,6E and uses short F0 reset sequence26 EN29LV040(A) has 1C,4F and uses short F0 reset sequence22 * EN29F512 has 1C,21 23 * EN29F010 has 1C,20 24 * EN29F040A has 1C,04 25 * EN29LV010 has 1C,6E and uses short F0 reset sequence 26 * EN29LV040(A) has 1C,4F and uses short F0 reset sequence 27 27 */ 28 29 #include <stdio.h> 30 #include <stdint.h> 31 #include "flash.h" 32 28 33 int probe_en29f512(struct flashchip *flash) 29 34 { … … 54 59 55 60 /* 56 EN29F002AT has 1C,9257 EN29F002AB has 1C,9761 * EN29F002AT has 1C,92 62 * EN29F002AB has 1C,97 58 63 */ 64 65 /* This does not seem to function properly for EN29F002NT. */ 59 66 int probe_en29f002a(struct flashchip *flash) 60 67 { … … 84 91 } 85 92 93 /* The EN29F002 chip needs repeated single byte writing, no block writing. */ 94 int write_en29f002a(struct flashchip *flash, uint8_t *buf) 95 { 96 int i; 97 int total_size = flash->total_size * 1024; 98 volatile uint8_t *bios = flash->virtual_memory; 99 volatile uint8_t *dst = bios; 100 101 // *bios = 0xF0; 102 myusec_delay(10); 103 erase_chip_jedec(flash); 104 105 printf("Programming page: "); 106 for (i = 0; i < total_size; i++) { 107 /* write to the sector */ 108 if ((i & 0xfff) == 0) 109 printf("address: 0x%08lx", (unsigned long)i); 110 *(bios + 0x5555) = 0xAA; 111 *(bios + 0x2AAA) = 0x55; 112 *(bios + 0x5555) = 0xA0; 113 *dst++ = *buf++; 114 115 /* wait for Toggle bit ready */ 116 toggle_ready_jedec(dst); 117 118 if ((i & 0xfff) == 0) 119 printf("\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b"); 120 } 121 122 printf("\n"); 123 return 0; 124 } -
trunk/util/flashrom/flash.h
r3431 r3602 436 436 int write_29f040b(struct flashchip *flash, uint8_t *buf); 437 437 438 /* en29f002a.c */ 439 int probe_en29f002a(struct flashchip *flash); 440 int erase_en29f002a(struct flashchip *flash); 441 int write_en29f002a(struct flashchip *flash, uint8_t *buf); 442 438 443 /* ichspi.c */ 439 444 int ich_spi_command(unsigned int writecnt, unsigned int readcnt, const unsigned char *writearr, unsigned char *readarr); -
trunk/util/flashrom/flashchips.c
r3570 r3602 48 48 {"AMIC", "A49LF040A", AMIC_ID_NOPREFIX, AMIC_A49LF040A, 512, 64 * 1024, TEST_OK_PREW, probe_49fl00x, erase_49fl00x, write_49fl00x}, 49 49 {"EMST", "F49B002UA", EMST_ID, EMST_F49B002UA, 256, 4096, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_49f002}, 50 {"EON", "EN29F002(A)(N)B", EON_ID, EN_29F002B, 256, 256, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_ jedec},51 {"EON", "EN29F002(A)(N)T", EON_ID, EN_29F002T, 256, 256, TEST_ UNTESTED, probe_jedec, erase_chip_jedec, write_jedec},50 {"EON", "EN29F002(A)(N)B", EON_ID, EN_29F002B, 256, 256, TEST_UNTESTED, probe_jedec, erase_chip_jedec, write_en29f002a}, 51 {"EON", "EN29F002(A)(N)T", EON_ID, EN_29F002T, 256, 256, TEST_OK_PREW, probe_jedec, erase_chip_jedec, write_en29f002a}, 52 52 {"Fujitsu", "MBM29F400TC", FUJITSU_ID, MBM29F400TC_STRANGE, 512, 64 * 1024, TEST_UNTESTED, probe_m29f400bt, erase_m29f400bt, write_coreboot_m29f400bt}, 53 53 {"Intel", "82802AB", INTEL_ID, 173, 512, 64 * 1024, TEST_OK_PREW, probe_82802ab, erase_82802ab, write_82802ab},
