#define ID_SST39VF800A 0x2781
#define ID_SST39VF1601 0x234B
#define ID_SST39VF3201 0x235B
-// add SST and ST flash device id
-#define ID_SST39VF3202 0x235A
-#define ID_M29W320ET 0x2256
#define ID_SST39VF6401 0x236B
+
/* A list of Intel compatible device ID's - add others as needed */
#define ID_I28F160C3T 0x88C2
#define ID_I28F160C3B 0x88C3
#define ID_I28F320C3T 0x88C4
#define ID_I28F320C3B 0x88C5
-#define ID_I28F640J3 0x0017
+#define ID_I28F640J3 0x8916
#define CFI_FLASH_DEVICES \
{{ID_AM29DL800T, "AM29DL800T"}, \
{ID_SST39VF800A, "SST39VF800A"}, \
{ID_SST39VF1601, "SST39VF1601"}, \
{ID_SST39VF3201, "SST39VF3201"}, \
- {ID_SST39VF3202, "SST39VF3202"}, \
- {ID_M29W320ET, "M29W320ET"}, \
{ID_SST39VF6401, "SST39VF6401"}, \
{ID_I28F160C3T, "I28F160C3T"}, \
{ID_I28F160C3B, "I28F160C3B"}, \
case ID_AM29LV320MT:
case ID_AM29LV200BT:
case ID_MX29LV640BT:
- // add ST flash device id here
- case ID_M29W320ET:
- // add ST flash device id here
flashFamily = FLASH_AMD;
break;
case ID_SST39VF200A:
case ID_SST39VF800A:
case ID_SST39VF1601:
case ID_SST39VF3201:
- // add SST flash device id here
- case ID_SST39VF3202:
- // add SST flash device id here
case ID_SST39VF6401:
flashFamily = FLASH_SST;
break;
case ID_AM29LV200BT:
case ID_SST39VF1601:
case ID_MX29LV640BT:
- // add SST and ST flash device id here
- case ID_SST39VF3202:
- case ID_M29W320ET:
- // add SST and ST flash device id here
flipCFIGeometry = TRUE;
break;
default:
if (cfi_flash_wait(sector, 0, 0xffff) == STATUS_READY)
break;
}
-
+
return(FLASH_API_OK);
}
int ret = FLASH_API_ERROR;
int i;
unsigned char *p = cfi_flash_get_memptr(sector) + offset;
-#ifdef _CFE_
- printk("Flash writing sector %d %x\n", sector, p);
-#endif
+
/* After writing the flash block, compare the contents to the source
* buffer. Try to write the sector successfully up to three times.
*/
flash_sector_erase_int(sector);
ret = FLASH_API_ERROR;
}
- // printk( "%c", i==0 ? '*' : ' ' );
if( ret == FLASH_API_ERROR )
- printk( "Flash write sector %d error. Verify failed\n", sector );
+ printk( "Flash write error. Verify failed\n" );
return( ret );
}
flashptr[offset/2] = data;
break;
case FLASH_SERASE:
- //flashptr[0] = 0x60; Block Unlock is not required.
- //flashptr[0] = 0xD0;
+ flashptr[0] = 0x60;
+ flashptr[0] = 0xD0;
flashptr[0] = 0x20;
flashptr[0] = 0xD0;
break;
while(!(*flashptr & 0x80));
if (*flashptr & 0x30) {
flashptr[0] = 0x50;
- printk("CFI: Wait error &d\n", *flashptr);
cfi_flash_command(FLASH_RESET, 0, 0, 0);
return STATUS_TIMEOUT;
}