[vortex] Added chip and fixed bug for chips on vortex cards [PATCH]

Santiago Garcia Mantinan list-vortex at manty.net
Wed Jun 23 12:03:35 PDT 2004


Hi!

I have added SST39VF512 to libflash.c and fixed the sleep on chip erase to
meet max erase time of 10 seconds acording to the specs of AT49BV512. 10
seconds is what the specs say, I know it sounds too much, in fact, in my
tests a much smaller timing would do, but I prefer to be safe and follow the
specs and not fail like the old version did.

--- nictools-pci-1.3.6.orig/libflash.c
+++ nictools-pci-1.3.6/libflash.c
@@ -92,6 +92,7 @@
 	{ 0x1F, 0xC4, 0, 512*1024, 256, "Atmel AT29LV040A", },
 	/* Bulk-erase, byte-program parts. */
 	{ 0x1F, 0x03, ERASE_FIRST, 64*1024,   1, "Atmel AT49BV512", },
+	{ 0xBF, 0xD4, ERASE_FIRST, 64*1024,   1, "Silicon Storage Technology SST39VF512", },
 	/* AMD parts that require 90/01 read method. */
 	{ 0x01, 0x6D, 0, 128*1024, 8*1024, "AMD Am29LV001BB", },
 	{ 0x01, 0xED, 0, 128*1024, 8*1024, "AMD Am29LV001BT", },
@@ -332,7 +333,9 @@
 {
 	do_cmd(addr_ioaddr, data_ioaddr, 0x80);
 	do_cmd(addr_ioaddr, data_ioaddr, 0x10);
-	usleep(20000);				/* 20 msec. */
+	/* While SST39VF512 specifies a max tsce of 100 ms, the */
+	/* AT49BV512 specifies a tEC Erase Cycle Time of 10 sec, so ... */
+	sleep(10);
 }
 
 int flash_program(long addr_ioaddr, long data_ioaddr, char *filename)

The code has been tested on my two cards, one SST39VF512 based and the other
AT49BV512 based, and now works ok, while before it didn't support the
SST39VF512 and didn't work correctly on the AT49BV512.

If there is any question on these, don't hesitate to ask.

Regards...
-- 
Manty/BestiaTester -> http://manty.net


More information about the vortex mailing list