[flashrom] [PATCH 3/5] ft2232_spi: allow CLOCK_X5 to be set at runtime

Carl-Daniel Hailfinger c-d.hailfinger.devel.2006 at gmx.net
Fri Nov 12 12:52:14 CET 2010


On 10.11.2010 04:20, Carl-Daniel Hailfinger wrote:
> On 16.10.2010 14:20, Alex Badea wrote:
>   
>> Check at init-time whether the chip is a type 'H' (FT2232H or FT4232H).
>> If not, omit the disable-divide-by-5 (0x8a) command which can confuse
>> older chips.
>>
>> Signed-off-by: Alex Badea <vamposdecampos at gmail.com>
>>   
>>     
>
> Thanks for your patch.
> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
> and committed in r1229.
>   

The following hunk in flashrom caused compilation problems on libftdi
<0.16, e.g. the libftdi in Debian stable:

> @@ -186,6 +187,12 @@
>  		exit(-1); // TODO
>  	}
>  
> +	if (ftdic->type != TYPE_2232H && ftdic->type != TYPE_4232H) {
> +		msg_pdbg("FTDI chip type %d is not high-speed\n",
> +			ftdic->type);
> +		clock_5x = 0;
> +	}
> +
>  	if (ftdi_set_interface(ftdic, ft2232_interface) < 0) {
>  		msg_perr("Unable to select interface: %s\n",
>  				ftdic->error_str);
>   

TYPE_2232H and TYPE_4232H are not defined before libftdi 0.16.

Do you have any idea how to work around this except requiring a newer
libftdi?

Regards,
Carl-Daniel

-- 
http://www.hailfinger.org/





More information about the flashrom mailing list