Mike Banon uploaded patch set #2 to this change.

View Change

Add "gingerly" flashing mode for the unreliable ISP environments

Some in-system-programming environments are very unreliable, e.g.
when you connect a SOIC8 test clip to the flash chip of WR841ND v9
wireless router: because the low power SOC of this router becomes
powered and is constantly trying to boot, the router's flash chip
is correctly detected only 30% of times, and when it is detected
just 30% of the operations are successful - the rest result in
zeroes or garbage data being read from / written to a flash chip.

While in this new mode called "-g" / "--gingerly", flashrom will be
constantly probing for a flash chip until it is correctly detected -
and then, depending on the operation selected by a user, at the
moments of chip availability it will be reading or writing by the
small chunks of 256 bytes maximum size, verifying each small chunk
and retrying the operation until the verification becomes successful.
Constant probing between the small chunk operations is also being
done - to avoid a possible situation where we have got two identical
blocks of zeroes while reading a chunk and erroneously accepted it.

Currently this mode is active only for those SPI25 chips which are
".write = spi_chip_write_256" and ".read = spi_chip_read", but later
could be expanded to more functions to become useful for more chips.

Change-Id: Ie3f18276d9fb7233d082720cb29d154f31c77100
Signed-off-by: Mike Banon <mikebdp2@gmail.com>
---
M cli_classic.c
M flash.h
M libflashrom.c
M libflashrom.h
M spi25.c
5 files changed, 120 insertions(+), 16 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/40/23840/2

To view, visit change 23840. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Ie3f18276d9fb7233d082720cb29d154f31c77100
Gerrit-Change-Number: 23840
Gerrit-PatchSet: 2
Gerrit-Owner: Mike Banon <mikebdp2@gmail.com>
Gerrit-Reviewer: Mike Banon <mikebdp2@gmail.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>