summaryrefslogtreecommitdiff
path: root/spi25_statusreg.c
diff options
context:
space:
mode:
authorstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-06-04 16:17:03 +0000
committerstefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1>2014-06-04 16:17:03 +0000
commit707515824ec7cf05088e9382975e43a678933153 (patch)
tree012c6fd5e70fa651b144f556c7e3a0b3f605d18a /spi25_statusreg.c
parent82050593e173985783bfe9aac00b403a6d3d9ec6 (diff)
downloadflashrom-707515824ec7cf05088e9382975e43a678933153.tar.gz
Add support for Sanyo LE25FW106.
Also, add spi_disable_blockprotect_bp1_srwd(). Originally written and tested by The Raven <originalraven@hotmail.com>. Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at> git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1818 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'spi25_statusreg.c')
-rw-r--r--spi25_statusreg.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/spi25_statusreg.c b/spi25_statusreg.c
index 793290a..69b2126 100644
--- a/spi25_statusreg.c
+++ b/spi25_statusreg.c
@@ -196,6 +196,13 @@ int spi_disable_blockprotect(struct flashctx *flash)
return spi_disable_blockprotect_generic(flash, 0x3C, 0, 0, 0xFF);
}
+/* A common block protection disable that tries to unset the status register bits masked by 0x0C (BP0-1) and
+ * protected/locked by bit #7. Useful when bits 4-5 may be non-0). */
+int spi_disable_blockprotect_bp1_srwd(struct flashctx *flash)
+{
+ return spi_disable_blockprotect_generic(flash, 0x0C, 1 << 7, 0, 0xFF);
+}
+
/* A common block protection disable that tries to unset the status register bits masked by 0x1C (BP0-2) and
* protected/locked by bit #7. Useful when bit #5 is neither a protection bit nor reserved (and hence possibly
* non-0). */