issue CFI_INTEL_CMD_WRITE_TO_BUFFER when polling SR_READY in buffered

write (Michael Walle)


git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1815 b68d4a1b-bc3d-0410-92ed-d4ac073336b7
master
Arnim Läuger 15 years ago
parent 7941d528ea
commit 00fb2b714e

@ -1,3 +1,8 @@
2010-07-30 Arnim Laeuger <arniml>
* src/flash/intel.c: issue CFI_INTEL_CMD_WRITE_TO_BUFFER when polling
SR_READY in buffered write (Michael Walle)
2010-07-30 Mike Frysinger <vapier@gentoo.org>
* include/urjtag/cable.h (URJ_CABLE_PARAM_KEY): Add new cable params for tdi,

@ -341,9 +341,10 @@ intel_flash_program_buffer (urj_flash_cfi_array_t *cfi_array,
/* issue command WRITE_TO_BUFFER */
URJ_BUS_WRITE (bus, cfi_array->address,
CFI_INTEL_CMD_CLEAR_STATUS_REGISTER);
URJ_BUS_WRITE (bus, adr, CFI_INTEL_CMD_WRITE_TO_BUFFER);
/* poll XSR7 == 1 */
while (!((sr = URJ_BUS_READ (bus, cfi_array->address) & 0xFE) & CFI_INTEL_SR_READY)); /* TODO: add timeout */
do {
URJ_BUS_WRITE (bus, adr, CFI_INTEL_CMD_WRITE_TO_BUFFER);
} while (!((sr = URJ_BUS_READ (bus, cfi_array->address) & 0xFE) & CFI_INTEL_SR_READY)); /* TODO: add timeout */
/* write count value (number of upcoming writes - 1) */
URJ_BUS_WRITE (bus, adr, wcount - 1);

Loading…
Cancel
Save