summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2012-06-16 00:02:27 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2012-06-16 00:02:27 +0000
commit49d72a06ce7c50164a532073cdb7207c1d6bf0c0 (patch)
tree8faa91383e0fb7d0634830e5d73cdd1fd0dc8f27
parent67c7dcc26f4ff449d915d6610c8a453821877bb0 (diff)
downloadflashrom-49d72a06ce7c50164a532073cdb7207c1d6bf0c0.zip
flashrom-49d72a06ce7c50164a532073cdb7207c1d6bf0c0.tar.gz
Add voltage change delays to dediprog driver
Some investigations have shown that the original dediprog driver waits about 200ms after setting voltage up and before setting voltage down. This patch adds those delays. It helps flash chips to come up in time. Corresponding to flashrom svn r1544. Signed-off-by: Nico Huber <nico.huber@secunet.com> Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
-rw-r--r--dediprog.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/dediprog.c b/dediprog.c
index df8af61..cdd27b0 100644
--- a/dediprog.c
+++ b/dediprog.c
@@ -131,6 +131,10 @@ static int dediprog_set_spi_voltage(int millivolt)
msg_pdbg("Setting SPI voltage to %u.%03u V\n", millivolt / 1000,
millivolt % 1000);
+ if (voltage_selector == 0) {
+ /* Wait some time as the original driver does. */
+ programmer_delay(200 * 1000);
+ }
ret = usb_control_msg(dediprog_handle, 0x42, 0x9, voltage_selector,
0xff, NULL, 0x0, DEFAULT_TIMEOUT);
if (ret != 0x0) {
@@ -138,6 +142,10 @@ static int dediprog_set_spi_voltage(int millivolt)
voltage_selector);
return 1;
}
+ if (voltage_selector != 0) {
+ /* Wait some time as the original driver does. */
+ programmer_delay(200 * 1000);
+ }
return 0;
}
OpenPOWER on IntegriCloud