1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 14:33:18 +02:00

Allow to select FTDI device by serial number

Requires libftdi > 0.5 (2004, commit ID a8f46ddc1595b1b07abfcce613acdafe5b8ddf9d).
Idea stolen from chromiumos commit 5eb5624aeb7e2ee483e2fa0823c4e634c8ea3e68:
http://git.chromium.org/gitweb/?p=chromiumos/third_party/flashrom.git;a=commit;h=5eb5624aeb7e2ee483e2fa0823c4e634c8ea3e68

Corresponding to flashrom svn r1599.

Signed-off-by: Shik Chen <shik@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
Shik Chen
2012-09-17 00:40:54 +00:00
committed by Stefan Tauner
parent 5bfef9d321
commit 14fbc4b400
2 changed files with 12 additions and 1 deletions

View File

@ -283,7 +283,9 @@ int ft2232_spi_init(void)
msg_perr("Unable to select interface: %s\n", ftdic->error_str);
}
f = ftdi_usb_open(ftdic, ft2232_vid, ft2232_type);
arg = extract_programmer_param("serial");
f = ftdi_usb_open_desc(ftdic, ft2232_vid, ft2232_type, NULL, arg);
free(arg);
if (f < 0 && f != -5) {
msg_perr("Unable to open FTDI device: %d (%s)\n", f,