* avr.c (avr_read, avr_write): Don't bail out on TPI parts if

their programmer doesn't provide a (low-level) cmd_tpi method;
instead, fall back to the normal programmer methods which are
supposed to handle the situation.
This fixes a regression where the recent bitbang-TPI implementation
broke TPI handling of STK600/AVRISPmkII.



git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@1008 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch 2011-09-15 11:15:06 +00:00
parent d742827da1
commit 833da9f117
2 changed files with 13 additions and 13 deletions

View File

@ -1,3 +1,12 @@
2011-09-15 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* avr.c (avr_read, avr_write): Don't bail out on TPI parts if
their programmer doesn't provide a (low-level) cmd_tpi method;
instead, fall back to the normal programmer methods which are
supposed to handle the situation.
This fixes a regression where the recent bitbang-TPI implementation
broke TPI handling of STK600/AVRISPmkII.
2011-09-13 Joerg Wunsch <j.gnu@uriah.heep.sax.de> 2011-09-13 Joerg Wunsch <j.gnu@uriah.heep.sax.de>
* stk500v2.c (stk500v2_command): Treat warnings as errors rather than * stk500v2.c (stk500v2_command): Treat warnings as errors rather than

17
avr.c
View File

@ -235,12 +235,8 @@ int avr_read(PROGRAMMER * pgm, AVRPART * p, char * memtype,
memset(mem->buf, 0xff, mem->size); memset(mem->buf, 0xff, mem->size);
/* supports "paged load" thru post-increment */ /* supports "paged load" thru post-increment */
if ((p->flags & AVRPART_HAS_TPI) && mem->page_size != 0) { if ((p->flags & AVRPART_HAS_TPI) && mem->page_size != 0 &&
if (pgm->cmd_tpi == NULL) { pgm->cmd_tpi != NULL) {
fprintf(stderr, "%s: Error: %s programmer does not support TPI\n",
progname, pgm->type);
return -1;
}
while (avr_tpi_poll_nvmbsy(pgm)); while (avr_tpi_poll_nvmbsy(pgm));
@ -752,13 +748,8 @@ int avr_write(PROGRAMMER * pgm, AVRPART * p, char * memtype, int size,
} }
if ((p->flags & AVRPART_HAS_TPI) && m->page_size != 0) { if ((p->flags & AVRPART_HAS_TPI) && m->page_size != 0 &&
if (pgm->cmd_tpi == NULL) { pgm->cmd_tpi != NULL) {
fprintf(stderr,
"%s: Error: %s programmer does not support TPI\n",
progname, pgm->type);
return -1;
}
while (avr_tpi_poll_nvmbsy(pgm)); while (avr_tpi_poll_nvmbsy(pgm));