summaryrefslogtreecommitdiffstats
path: root/cli_classic.c
diff options
context:
space:
mode:
authorCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-09-15 10:20:16 +0000
committerCarl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>2010-09-15 10:20:16 +0000
commit9ad4255b5e206899351b446dec96b84c989627b6 (patch)
tree1f7069b9085f188b261d7c93ceca03b48f32d439 /cli_classic.c
parent2822888c810eaf2d68271f4dac4a0ad639221fd3 (diff)
downloadast2050-flashrom-9ad4255b5e206899351b446dec96b84c989627b6.zip
ast2050-flashrom-9ad4255b5e206899351b446dec96b84c989627b6.tar.gz
Delay between probe and subsequent operations
Some flash chips need time to exit ID mode, and while we take care of correct timing for the matching probe, subsequent probes may have totally different timing, and that can lead to garbage responses from the flash chip during the first accesses after the probe sequence is done. Delay 100 ms between the last probe and any subsequent operation. To ensure maximum correctness, we would have to reset the chip first in case the last probe function left the chip in an undefined (non-read) state. That will be possible once struct flashchip has a .reset function. This fixes unstable erase/read/write for some flahs chips on nic3com and possible other use cases as well. Thanks to Maciej Pijanka for reporting the issue and testing patches. Corresponding to flashrom svn r1172. Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net> Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
Diffstat (limited to 'cli_classic.c')
-rw-r--r--cli_classic.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli_classic.c b/cli_classic.c
index d78c575..09504d7 100644
--- a/cli_classic.c
+++ b/cli_classic.c
@@ -456,5 +456,10 @@ int cli_classic(int argc, char *argv[])
if (write_it && !dont_verify_it)
verify_it = 1;
+ /* FIXME: We should issue an unconditional chip reset here. This can be
+ * done once we have a .reset function in struct flashchip.
+ * Give the chip time to settle.
+ */
+ programmer_delay(100000);
return doit(flash, force, filename, read_it, write_it, erase_it, verify_it);
}
OpenPOWER on IntegriCloud