Initialize the internal delay function before running programmer init
The programmer init may need a good host delay function.
Corresponding to flashrom svn r1006.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
diff --git a/cli_classic.c b/cli_classic.c
index 6e8f098..baca900 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -378,6 +378,9 @@
flash = NULL;
}
+ /* FIXME: Delay calibration should happen in programmer code. */
+ myusec_calibrate_delay();
+
msg_pdbg("Initializing %s programmer\n",
programmer_table[programmer].name);
if (programmer_init()) {
@@ -386,8 +389,6 @@
}
/* FIXME: Delay calibration should happen in programmer code. */
- myusec_calibrate_delay();
-
for (i = 0; i < ARRAY_SIZE(flashes); i++) {
flashes[i] =
probe_flash(i ? flashes[i - 1] + 1 : flashchips, 0);