[flashrom] [PATCH] Check if spi25 block protection could be disabled
Carl-Daniel Hailfinger
c-d.hailfinger.devel.2006 at gmx.net
Fri Jul 9 18:21:43 CEST 2010
Check if disabling the block protection on generic SPI chips works and
complain otherwise.
This patch will also appear at the top of
http://patchwork.coreboot.org/project/flashrom/list/
arunkumarm, please download latest flashrom (at least r1072) from
subversion:
svn co svn://coreboot.org/flashrom/trunk flashrom
and then apply this patch and try to write again in verbose mode.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006 at gmx.net>
Index: flashrom-spi25_disable_blockprotect_check/spi25.c
===================================================================
--- flashrom-spi25_disable_blockprotect_check/spi25.c (Revision 1072)
+++ flashrom-spi25_disable_blockprotect_check/spi25.c (Arbeitskopie)
@@ -855,6 +855,11 @@
msg_cerr("spi_write_status_register failed\n");
return result;
}
+ status = spi_read_status_register();
+ if ((status & 0x3c) != 0) {
+ msg_cerr("Block protection could not be disabled!\n");
+ /* Should we error out here? */
+ }
}
return 0;
}
--
http://www.hailfinger.org/
More information about the flashrom
mailing list