diff options
author | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2012-09-17 00:40:54 +0000 |
---|---|---|
committer | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2012-09-17 00:40:54 +0000 |
commit | aff33539f7bd0d7b767b8e04d193db8147565d66 (patch) | |
tree | a1a39f7057203e00122fba8868097a0a2d246a88 /ft2232_spi.c | |
parent | c308ba53de0f5d5e7e28ad3e68c1c7e2a6bf13e0 (diff) | |
download | flashrom-aff33539f7bd0d7b767b8e04d193db8147565d66.tar.gz |
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
Signed-off-by: Shik Chen <shik@chromium.org>
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1599 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'ft2232_spi.c')
-rw-r--r-- | ft2232_spi.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ft2232_spi.c b/ft2232_spi.c index edea1e6..1b80674 100644 --- a/ft2232_spi.c +++ b/ft2232_spi.c @@ -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, |