also issue CFI_CMD_READ_ARRAY2, required to reset

some AMD/SCS compliant chips that don't honor CFI_CMD_READ_ARRAY1


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1685 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 15 years ago
parent f2a11a15b2
commit 1dd4faa10c

@ -1,3 +1,8 @@
2009-12-23 Arnim Laeuger <arniml>
* src/flash/cfi.c: also issue CFI_CMD_READ_ARRAY2, required to reset
some AMD/SCS compliant chips that don't honor CFI_CMD_READ_ARRAY1
2009-11-22 Arnim Laeuger <arniml>
* src/flash/intel.c, src/flash/amd.c: set max_bytes_write to std value 1

@ -143,6 +143,7 @@ urj_flash_cfi_detect (urj_bus_t *bus, uint32_t adr,
}
write1 (0, CFI_CMD_READ_ARRAY1);
write1 (0, CFI_CMD_READ_ARRAY2);
}
if (ma > 4)
@ -157,6 +158,7 @@ urj_flash_cfi_detect (urj_bus_t *bus, uint32_t adr,
if (read1 (CFI_QUERY_ID_OFFSET + 2) != 'Y')
{
write1 (0, CFI_CMD_READ_ARRAY1);
write1 (0, CFI_CMD_READ_ARRAY2);
urj_error_set (URJ_ERROR_FLASH, "CFI not detected (Y)");
return URJ_STATUS_FAIL;
}
@ -166,6 +168,7 @@ urj_flash_cfi_detect (urj_bus_t *bus, uint32_t adr,
if (!(*cfi_array)->cfi_chips[d / 8])
{
write1 (0, CFI_CMD_READ_ARRAY1);
write1 (0, CFI_CMD_READ_ARRAY2);
urj_error_set (URJ_ERROR_OUT_OF_MEMORY, "calloc(%zd,%zd) fails",
(size_t) 1, sizeof (urj_flash_cfi_chip_t));
return URJ_STATUS_FAIL;
@ -248,6 +251,7 @@ urj_flash_cfi_detect (urj_bus_t *bus, uint32_t adr,
if (!cfi->device_geometry.erase_block_regions)
{
write1 (0, CFI_CMD_READ_ARRAY1);
write1 (0, CFI_CMD_READ_ARRAY2);
urj_error_set (URJ_ERROR_OUT_OF_MEMORY, "malloc(%zd) fails",
(size_t) tmp
* sizeof (urj_flash_cfi_erase_block_region_t));
@ -288,6 +292,7 @@ urj_flash_cfi_detect (urj_bus_t *bus, uint32_t adr,
if (read1 (0) != 'P' || read1 (1) != 'R' || read1 (2) != 'I')
{
write1 (0, CFI_CMD_READ_ARRAY1);
write1 (0, CFI_CMD_READ_ARRAY2);
urj_error_set (URJ_ERROR_FLASH,
"CFI primary vendor table not detected");
return URJ_STATUS_FAIL;
@ -306,6 +311,7 @@ urj_flash_cfi_detect (urj_bus_t *bus, uint32_t adr,
if (!pri_vendor_tbl)
{
write1 (0, CFI_CMD_READ_ARRAY1);
write1 (0, CFI_CMD_READ_ARRAY2);
urj_error_set (URJ_ERROR_OUT_OF_MEMORY, "calloc(%zd,%zd) fails",
(size_t) 1,
sizeof (urj_flash_cfi_amd_pri_extened_query_structure_t)
@ -421,6 +427,7 @@ urj_flash_cfi_detect (urj_bus_t *bus, uint32_t adr,
/* Read Array */
write1 (0, CFI_CMD_READ_ARRAY1);
write1 (0, CFI_CMD_READ_ARRAY2);
#undef A
#undef D

Loading…
Cancel
Save