Call to ftdi_set_interface right after ftdi_init and before call to ftdi_usb_open
Signed-off-by: Ilya A. Volynets-Evenbakh <[email protected]> --- ft2232_spi.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ft2232_spi.c b/ft2232_spi.c index aec2fd5..aaca5f3 100644 --- a/ft2232_spi.c +++ b/ft2232_spi.c @@ -276,6 +276,11 @@ int ft2232_spi_init(void) return -3; } + if (ftdi_set_interface(ftdic, ft2232_interface) < 0) { + msg_perr("Unable to select interface: %s\n", + ftdic->error_str); + } + f = ftdi_usb_open(ftdic, ft2232_vid, ft2232_type); if (f < 0 && f != -5) { @@ -290,11 +295,6 @@ int ft2232_spi_init(void) clock_5x = 0; } - if (ftdi_set_interface(ftdic, ft2232_interface) < 0) { - msg_perr("Unable to select interface: %s\n", - ftdic->error_str); - } - if (ftdi_usb_reset(ftdic) < 0) { msg_perr("Unable to reset FTDI device\n"); } -- 1.7.3.4 _______________________________________________ flashrom mailing list [email protected] http://www.flashrom.org/mailman/listinfo/flashrom
