[coreboot] ft4232-based spi programmer

Paul Fox pgf at foxharp.boston.ma.us
Wed Jun 17 00:00:53 CEST 2009


carl-daniel wrote:
 > On 16.06.2009 19:44, Uwe Hermann wrote:
 > > On Tue, Jun 16, 2009 at 01:42:33PM +0200, Carl-Daniel Hailfinger wrote:
 > >   
 > >> On 12.06.2009 12:22, Carl-Daniel Hailfinger wrote:
 > >>     
 > >>> This patch adds support for a new SPI programmer, based on the
 > >>> FT2232H/4232H chip from FTDI.
 
...

 > >> +		exit(-1);
 > >> +	}
 > >> +
 > >> +	if (ftdi_set_interface(ftdic, INTERFACE_B) < 0) {
 > >> +		fprintf(stderr, "unable to select FT2232 channel B: %s\n",
 > >> +				ftdic->error_str);
 > >> +	}
 > >> +
 > >> +	if (ftdi_usb_reset(ftdic) < 0) {
 > >> +		fprintf(stderr, "unable to reset ftdi device\n");
 > >> +	}
 > >>     
 > >
 > > There's no return or exit here, are these non-critical? Same for other
 > > such checks...
 > >   
 > 
 > No idea. Paul?

i don't think continuing will be productive.  this was an
oversight.  some of these calls, including the ones below, may
not be mandatory for proper programming, but if the operation
doesn't work, it indicates a communications or hardware problem. 
or a bug.  in any case, we should fail.

 > 
 > 
 > >> +
 > >> +	if (ftdi_set_latency_timer(ftdic, 2) < 0) {
 > >> +		fprintf(stderr, "unable to set latency timer\n");
 > >> +	}
 > >> +
 > >> +	if (ftdi_write_data_set_chunksize(ftdic, 512)) {
 > >> +		fprintf(stderr, "unable to set chunk size\n");
 > >> +	}
 > >> +
 > >> +	if (ftdi_set_bitmode(ftdic, 0x00, 2) < 0) {
 > >> +		fprintf(stderr, "unable to set bitmode\n");
 > >> +	}
 > >>     
 > >
 > >   

 ...

 > Thanks for the review, committed in r598.

thanks!

paul
=---------------------
 paul fox, pgf at foxharp.boston.ma.us (arlington, ma, where it's 62.6 degrees)




More information about the coreboot mailing list