Author: hailfinger
Date: Sat Jun 16 02:02:27 2012
New Revision: 1544
URL: http://flashrom.org/trac/flashrom/changeset/1544

Log:
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.

Signed-off-by: Nico Huber <[email protected]>
Acked-by: Carl-Daniel Hailfinger <[email protected]>

Modified:
   trunk/dediprog.c

Modified: trunk/dediprog.c
==============================================================================
--- trunk/dediprog.c    Sat Jun 16 00:28:12 2012        (r1543)
+++ trunk/dediprog.c    Sat Jun 16 02:02:27 2012        (r1544)
@@ -131,6 +131,10 @@
        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 @@
                         voltage_selector);
                return 1;
        }
+       if (voltage_selector != 0) {
+               /* Wait some time as the original driver does. */
+               programmer_delay(200 * 1000);
+       }
        return 0;
 }
 

_______________________________________________
flashrom mailing list
[email protected]
http://www.flashrom.org/mailman/listinfo/flashrom

Reply via email to