This patch makes flashrom use real partial writes

If you write an image full of 0xff, flashrom will erase and detect that
no write is needed. If you write an image which differs only in some
parts from the current flash contents, flashrom will detect that and not
touch unchanged areas.

Fix a long-standing bug in need_erase() for 256 byte granularity as
well.

Nice side benefit: Detailed progress printing. S means skipped E means
erased W means written

Thanks to Andrew Morgan for testing countless iterations of this patch.
Thanks to Richard A. Smith for testing on Dediprog SF100. Thanks to
David Hendricks for the review and for creating a partial write torture
test script and testing with it on Intel NM10 and AMD SB700 SPI. Thanks
to Idwer Vollering for testing with Intel SPI NICs. Thanks to Rudolf
Marek for testing on AMD SB710 and SiI SATA controllers. Thanks to
Michael Karcher for the review.

Corresponding to flashrom svn r1224.

Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: David Hendricks <dhendrix@google.com>
Acked-by: Rudolf Marek <r.marek@assembler.cz>
Acked-by: Idwer Vollering <vidwer@gmail.com>
Acked-by: Michael Karcher <flashrom@mkarcher.dialup.fu-berlin.de>
1 file changed