ft2232_spi: Allow runtime selection of FT2232H vs. FT4232H and interface A vs
B.
Corresponding to flashrom svn r638.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Tested-by: Jakob Bornecrantz <wallbraker@gmail.com>
Acked-by: Jakob Bornecrantz <wallbraker@gmail.com>
diff --git a/flashrom.c b/flashrom.c
index 6822b4f..af8281e 100644
--- a/flashrom.c
+++ b/flashrom.c
@@ -649,10 +649,12 @@
programmer = PROGRAMMER_IT87SPI;
} else if (strncmp(optarg, "ft2232spi", 9) == 0) {
programmer = PROGRAMMER_FT2232SPI;
- } else if (strncmp(optarg, "serprog", 7) == 0) {
- programmer = PROGRAMMER_SERPROG;
- if (optarg[7] == '=')
- serprog_param = strdup(optarg + 8);
+ if (optarg[9] == '=')
+ ft2232spi_param = strdup(optarg + 10);
+ } else if (strncmp(optarg, "serprog", 7) == 0) {
+ programmer = PROGRAMMER_SERPROG;
+ if (optarg[7] == '=')
+ serprog_param = strdup(optarg + 8);
} else {
printf("Error: Unknown programmer.\n");
exit(1);