libftdi Archives

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

From: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@xxxxxxx>
To: Alex Badea <vamposdecampos@xxxxxxxxx>
Cc: flashrom@xxxxxxxxxxxx, libftdi@xxxxxxxxxxxxxxxxxxxxxxx
Date: Fri, 12 Nov 2010 12:52:14 +0100
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@xxxxxxxxx>
>>   
>>     
>
> Thanks for your patch.
> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@xxxxxxx>
> 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/


--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to libftdi+unsubscribe@xxxxxxxxxxxxxxxxxxxxxxx   

Current Thread